diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-09-18 00:03:08 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-21 21:03:11 +0200 |
commit | 738c17b3a657b2017875c5b3ff9336944e4a8f22 (patch) | |
tree | b16f2606f67a1982f0bbc564c862eee9fd333220 | |
parent | 27128d82faf17cbf476cf5f750722612639bdcd7 (diff) | |
download | ffmpeg-738c17b3a657b2017875c5b3ff9336944e4a8f22.tar.gz |
rv10: Reject slices that does not have the same type as the first one
This prevents crashes with some corrupted bitstreams.
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | libavcodec/rv10.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index b8cdf4a312..189b79f4d0 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -560,8 +560,10 @@ static int rv10_decode_packet(AVCodecContext *avctx, return -1; ff_er_frame_start(s); } else { - if (s->current_picture_ptr->f.pict_type != s->pict_type) + if (s->current_picture_ptr->pict_type != s->pict_type) { + av_log(s->avctx, AV_LOG_ERROR, "Slice type mismatch\n"); return -1; + } } |