[FFmpeg-cvslog] rv10: Reject slices that does not have the same type as the first one
Laurent Aimar
git at videolan.org
Thu Nov 3 03:57:37 CET 2011
ffmpeg | branch: release/0.5 | Laurent Aimar <fenrir at videolan.org> | Sun Sep 18 00:03:08 2011 +0200| [9cda3d79154554c803877fcf22b1b2ffe66f5b1e] | committer: Michael Niedermayer
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 at martin.st>
(cherry picked from commit 4a29b471869353c3077fb4b25b6518eb1047afb7)
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9cda3d79154554c803877fcf22b1b2ffe66f5b1e
---
libavcodec/rv10.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index 71a25d6..ddf0f1d 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -642,6 +642,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->pict_type != s->pict_type) {
+ av_log(s->avctx, AV_LOG_ERROR, "Slice type mismatch\n");
+ return -1;
+ }
}
#ifdef DEBUG
More information about the ffmpeg-cvslog
mailing list