diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-09-18 00:03:08 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2011-09-19 14:58:33 +0300 |
commit | 4a29b471869353c3077fb4b25b6518eb1047afb7 (patch) | |
tree | b439fed3127bc2ab2a009a8cf9deeea80e709a8f /libavcodec | |
parent | ab09df9deae8be0e3346e9255a80d616517c32d5 (diff) | |
download | ffmpeg-4a29b471869353c3077fb4b25b6518eb1047afb7.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>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/rv10.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index d789eff787..3ba8102b50 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -531,6 +531,11 @@ static int rv10_decode_packet(AVCodecContext *avctx, if(MPV_frame_start(s, avctx) < 0) return -1; ff_er_frame_start(s); + } else { + if (s->current_picture_ptr->f.pict_type != s->pict_type) { + av_log(s->avctx, AV_LOG_ERROR, "Slice type mismatch\n"); + return -1; + } } av_dlog(avctx, "qscale=%d\n", s->qscale); |