[FFmpeg-cvslog] rv10: Reject slices that does not have the same type as the first one

Laurent Aimar git at videolan.org
Wed Sep 21 21:08:39 CEST 2011


ffmpeg | branch: release/0.8 | Laurent Aimar <fenrir at videolan.org> | Sun Sep 18 00:03:08 2011 +0200| [738c17b3a657b2017875c5b3ff9336944e4a8f22] | 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>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=738c17b3a657b2017875c5b3ff9336944e4a8f22
---

 libavcodec/rv10.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index b8cdf4a..189b79f 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;
+        }
     }
 
 



More information about the ffmpeg-cvslog mailing list