vp9: always consume the full input packet
authorHendrik Leppkes <h.leppkes@gmail.com>
Tue, 22 Oct 2013 15:57:56 +0000 (17:57 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 22 Oct 2013 16:52:40 +0000 (18:52 +0200)
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/vp9.c

index 1d06460..cb14ec4 100644 (file)
@@ -3495,14 +3495,14 @@ static int vp9_decode_packet(AVCodecContext *avctx, void *out_pic,
                 case_n(3, AV_RL24(idx));
                 case_n(4, AV_RL32(idx));
             }
-            return size;
+            return avpkt->size;
         }
     }
     // if we get here, there was no valid superframe index, i.e. this is just
     // one whole single frame - decode it as such from the complete input buf
     if ((res = vp9_decode_frame(avctx, out_pic, got_frame, data, size)) < 0)
         return res;
-    return size;
+    return avpkt->size;
 }
 
 static void vp9_decode_flush(AVCodecContext *ctx)