[FFmpeg-cvslog] vc1: Fix pic_header_flag=0 (SA10143.vc1)

Michael Niedermayer git at videolan.org
Sat Nov 26 23:24:04 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Nov 26 21:59:56 2011 +0100| [4fd5e7639be5e303849f29c1250e1ae7c138018d] | committer: Michael Niedermayer

vc1: Fix pic_header_flag=0 (SA10143.vc1)
Bug introduced in:
commit 4509be3d2f46a52ada8e2ecb476faed93e19abf3
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Tue Oct 11 11:56:42 2011 +0200

    vc1: reset interlaced variables, prevent another bunch of crashes.

    Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4fd5e7639be5e303849f29c1250e1ae7c138018d
---

 libavcodec/vc1.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index 7c4eb2e..9b759ed 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -825,10 +825,10 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
     int scale, shift, i; /* for initializing LUT for intensity compensation */
 
     v->numref=0;
-    v->fcm=0;
-    v->field_mode=0;
     v->p_frame_skipped = 0;
     if (v->second_field) {
+        if(v->fcm!=2 || v->field_mode!=1)
+            return -1;
         v->s.pict_type = (v->fptype & 1) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
         if (v->fptype & 4)
             v->s.pict_type = (v->fptype & 1) ? AV_PICTURE_TYPE_BI : AV_PICTURE_TYPE_B;



More information about the ffmpeg-cvslog mailing list