]> git.sesse.net Git - ffmpeg/commitdiff
vc1: fix decoding when end sequence is present
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Wed, 2 Mar 2011 11:17:33 +0000 (11:17 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 3 Mar 2011 13:15:11 +0000 (14:15 +0100)
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit fb985071263e6b3daff1c3d987df482b0146c2a0)

libavcodec/vc1dec.c

index ed92d8cadde44d236fcd572d0a13ac99d34e7c53..b27b6d01c1f94a7bdb84eb381b0284f7a46884a8 100644 (file)
@@ -3149,7 +3149,7 @@ static int vc1_decode_frame(AVCodecContext *avctx,
     const uint8_t *buf_start = buf;
 
     /* no supplementary picture */
-    if (buf_size == 0) {
+    if (buf_size == 0 || (buf_size == 4 && AV_RB32(buf) == VC1_CODE_ENDOFSEQ)) {
         /* special case for last picture */
         if (s->low_delay==0 && s->next_picture_ptr) {
             *pict= *(AVFrame*)s->next_picture_ptr;