aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/rv10.c
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-09-18 00:17:44 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-09-18 00:57:49 +0200
commitd788af6cf696d547a442c47e1ce6f93bc9fc97b6 (patch)
treea6268cfd645c7b8e178ede2419dd58e05e8fa9c8 /libavcodec/rv10.c
parenteac673d506eaefc29b0fc74b5043e41a2bf0967d (diff)
downloadffmpeg-d788af6cf696d547a442c47e1ce6f93bc9fc97b6.tar.gz
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@gmx.at>
Diffstat (limited to 'libavcodec/rv10.c')
-rw-r--r--libavcodec/rv10.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index d53265b418..18a79afbee 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 */