diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2007-03-11 09:16:11 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2007-03-11 09:16:11 +0000 |
commit | 284ad8a4f06087f3df94d6473774a01a8bececb5 (patch) | |
tree | daab137d79c081cb1f026a3db53e655ae9be8232 | |
parent | 09d9672ad66f5afde4907ad18bbddb16ddf4ad85 (diff) | |
download | ffmpeg-284ad8a4f06087f3df94d6473774a01a8bececb5.tar.gz |
Check dimensions to avoid division by zero due to invalid new dimensions.
Partially fixes http://bugzilla.mplayerhq.hu/show_bug.cgi?id=773.
Originally committed as revision 8321 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/rv10.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index af438a34b7..e1e8287d57 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -454,6 +454,8 @@ static int rv20_decode_picture_header(MpegEncContext *s) } if(new_w != s->width || new_h != s->height){ av_log(s->avctx, AV_LOG_DEBUG, "attempting to change resolution to %dx%d\n", new_w, new_h); + if (avcodec_check_dimensions(s->avctx, new_h, new_w) < 0) + return -1; MPV_common_end(s); s->width = s->avctx->width = new_w; s->height = s->avctx->height= new_h; |