aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-25 20:55:25 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-25 20:55:25 +0100
commit9e794d103c0bddee3d3b46c390b5d3b30435fa1d (patch)
treecad99ed0ca72ae525624f090a78859d1fc9afdfa
parent7d52f46db76283e346792e2fe9867f8adaf14489 (diff)
downloadffmpeg-9e794d103c0bddee3d3b46c390b5d3b30435fa1d.tar.gz
vc1dec: drop damaged B frames
Fixes: vc1_error_spilt.avi of Ticket606 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/vc1dec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 24422aef9a..f1efa105aa 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5719,6 +5719,8 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
//av_log(s->avctx, AV_LOG_INFO, "Consumed %i/%i bits\n", get_bits_count(&s->gb), s->gb.size_in_bits);
// if (get_bits_count(&s->gb) > buf_size * 8)
// return -1;
+ if(s->error_occurred & s->pict_type == AV_PICTURE_TYPE_B)
+ goto err;
ff_er_frame_end(s);
}