diff options
author | Martin Storsjö <martin@martin.st> | 2013-05-14 14:36:00 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-05-14 14:36:00 +0300 |
commit | 5d9d8461fbb87046a7ca220d3676a045bd7ab46e (patch) | |
tree | 251a29d189a6a0ab070ace4157cfdef517ffa466 /libavcodec | |
parent | fe06795d783785a76c6cbcaa2cd3012e6deb5fa5 (diff) | |
download | ffmpeg-5d9d8461fbb87046a7ca220d3676a045bd7ab46e.tar.gz |
vc1dec: Don't apply the loop filter on fields
Fixes read of uninitialized memory.
Based on a patch by Michael Niedermayer.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vc1dec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 994f5df52c..f1dc10aadb 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -4619,7 +4619,8 @@ static void vc1_decode_p_blocks(VC1Context *v) break; } - apply_loop_filter = s->loop_filter && !(s->avctx->skip_loop_filter >= AVDISCARD_NONKEY); + apply_loop_filter = s->loop_filter && !(s->avctx->skip_loop_filter >= AVDISCARD_NONKEY) && + v->fcm == PROGRESSIVE; s->first_slice_line = 1; memset(v->cbp_base, 0, sizeof(v->cbp_base[0])*2*s->mb_stride); for (s->mb_y = s->start_mb_y; s->mb_y < s->end_mb_y; s->mb_y++) { @@ -4633,7 +4634,7 @@ static void vc1_decode_p_blocks(VC1Context *v) else if (v->fcm == ILACE_FRAME) vc1_decode_p_mb_intfr(v); else vc1_decode_p_mb(v); - if (s->mb_y != s->start_mb_y && apply_loop_filter && v->fcm == PROGRESSIVE) + if (s->mb_y != s->start_mb_y && apply_loop_filter) vc1_apply_p_loop_filter(v); if (get_bits_count(&s->gb) > v->bits || get_bits_count(&s->gb) < 0) { // TODO: may need modification to handle slice coding |