summaryrefslogtreecommitdiffstats
path: root/libvideoeditor
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@google.com>2011-08-26 11:29:14 +0800
committerChih-Chung Chang <chihchung@google.com>2011-08-26 11:29:51 +0800
commit072be1ea494b0f4ca6d184e6c53d9ba01e539de2 (patch)
tree5352005510edafc2392ac801c1bdc3929565cd06 /libvideoeditor
parentaef59c544429aae73429a1325d43e830600e3b67 (diff)
downloadframeworks_av-072be1ea494b0f4ca6d184e6c53d9ba01e539de2.zip
frameworks_av-072be1ea494b0f4ca6d184e6c53d9ba01e539de2.tar.gz
frameworks_av-072be1ea494b0f4ca6d184e6c53d9ba01e539de2.tar.bz2
Fix 5200962: Handle 0-length buffers from OMXCodec and drop it.
Change-Id: I67c42c41f649f8e37055721efb67ab3ca4b02f0b
Diffstat (limited to 'libvideoeditor')
-rwxr-xr-xlibvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp b/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp
index f038b47..c5f1a0f 100755
--- a/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp
+++ b/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp
@@ -1384,6 +1384,13 @@ M4OSA_ERR VideoEditorVideoDecoder_decode(M4OSA_Context context,
continue;
}
+ // The OMXCodec client should expect to receive 0-length buffers
+ // and drop the 0-length buffers.
+ if (pNextBuffer->range_length() == 0) {
+ pNextBuffer->release();
+ continue;
+ }
+
// Now we have a good next buffer, release the previous one.
if (pDecoderBuffer != NULL) {
pDecoderBuffer->release();