[FFmpeg-cvslog] Reject slices that does not have the same type than the first one in RV10/ RV20 decoder.
Laurent Aimar
git at videolan.org
Sun Sep 18 02:01:06 CEST 2011
ffmpeg | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Sep 18 00:17:44 2011 +0200| [d788af6cf696d547a442c47e1ce6f93bc9fc97b6] | committer: Michael Niedermayer
Reject slices that does not have the same type than the first one in RV10/RV20 decoder.
This prevents crashes with some corrupted bitstreams.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d788af6cf696d547a442c47e1ce6f93bc9fc97b6
---
libavcodec/rv10.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index d53265b..18a79af 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -547,8 +547,12 @@ 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)
+ return -1;
}
+
av_dlog(avctx, "qscale=%d\n", s->qscale);
/* default quantization values */
More information about the ffmpeg-cvslog
mailing list