diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-09-18 00:17:44 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-21 20:56:53 +0200 |
commit | b59919afe2b6caad1ddcbbb71bdcf5a8750b8c71 (patch) | |
tree | 55e46dcc596d840de00022ff5de9be80815fc892 /libavcodec/rv10.c | |
parent | 764ffdd0ec069cd648fd069d6de233519a65d49e (diff) | |
download | ffmpeg-b59919afe2b6caad1ddcbbb71bdcf5a8750b8c71.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>
(cherry picked from commit d788af6cf696d547a442c47e1ce6f93bc9fc97b6)
Diffstat (limited to 'libavcodec/rv10.c')
-rw-r--r-- | libavcodec/rv10.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 2f822a8ac2..b8cdf4a312 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -559,8 +559,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 */ |