aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo_enc.c
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2015-03-02 20:27:26 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-03 12:36:36 +0100
commit2578a546183da09d49d5bba8ab5e982dece1dede (patch)
treeca0fd077f6b2e48688dcae1e219f289189147fd8 /libavcodec/mpegvideo_enc.c
parent618021ea58cda5ce294efa53ce5a69ce27420ef8 (diff)
downloadffmpeg-2578a546183da09d49d5bba8ab5e982dece1dede.tar.gz
avcodec/rv10: check size of s->mb_width * s->mb_height
If it doesn't fit into 12 bits it triggers an assertion. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r--libavcodec/mpegvideo_enc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 16f88aa85d..847b1164b6 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -3706,8 +3706,11 @@ static int encode_picture(MpegEncContext *s, int picture_number)
ff_msmpeg4_encode_picture_header(s, picture_number);
else if (CONFIG_MPEG4_ENCODER && s->h263_pred)
ff_mpeg4_encode_picture_header(s, picture_number);
- else if (CONFIG_RV10_ENCODER && s->codec_id == AV_CODEC_ID_RV10)
- ff_rv10_encode_picture_header(s, picture_number);
+ else if (CONFIG_RV10_ENCODER && s->codec_id == AV_CODEC_ID_RV10) {
+ ret = ff_rv10_encode_picture_header(s, picture_number);
+ if (ret < 0)
+ return ret;
+ }
else if (CONFIG_RV20_ENCODER && s->codec_id == AV_CODEC_ID_RV20)
ff_rv20_encode_picture_header(s, picture_number);
else if (CONFIG_FLV_ENCODER && s->codec_id == AV_CODEC_ID_FLV1)