OSDN Git Service

stagefright-plugins: check if input queue is empty
authorKeith Mok <kmok@cyngn.com>
Tue, 31 May 2016 23:08:48 +0000 (16:08 -0700)
committerKeith Mok <kmok@cyngn.com>
Tue, 31 May 2016 23:08:48 +0000 (16:08 -0700)
input queue may be empty when calling decodeAudio.
Add a guard for it.

DOGEDUMP-4184

Change-Id: I261e8d36fb4560fdcc04702b4e09a00c4b10cc47

omx/SoftFFmpegAudio.cpp

index 230af55..1688398 100644 (file)
@@ -1124,7 +1124,7 @@ int32_t SoftFFmpegAudio::decodeAudio() {
         }
     }
 
-    if (!is_flush) {
+    if (!is_flush && !inHeader) {
         if (len < 0) {
             //if error, we skip the frame 
             inputBufferUsedLength = mInputBufferSize;