diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2011-10-13 12:12:42 +0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-10-13 18:35:07 +0400 |
commit | 42feaf40700246d9afb9c27ef09a0022ddfdb998 (patch) | |
tree | 36e92c29052482716f8a620a1f6af238a2a77540 /libavcodec/vc1.c | |
parent | 47a1d794dba02239f9eeb37e9dfd4dfdb634c3b7 (diff) |
vc1: explicitly zero interlaced mode coding variables for progressive mode
Both v->fcm and v->field_mode are used in common code, now they won't be
reset for progressive frame after interlaced one causing writing past the
frame end for example.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec/vc1.c')
-rw-r--r-- | libavcodec/vc1.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 9d36811c2c..cb228e6107 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -832,17 +832,18 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) goto parse_common_info; } + v->field_mode = 0; if (v->interlace) { v->fcm = decode012(gb); if (v->fcm) { if (v->fcm == 2) v->field_mode = 1; - else - v->field_mode = 0; if (!v->warn_interlaced++) av_log(v->s.avctx, AV_LOG_ERROR, "Interlaced frames/fields support is incomplete\n"); } + } else { + v->fcm = 0; } if (v->field_mode) { |