Mercurial > libavcodec.hg
changeset 4646:cd5964d440e8 libavcodec
Check dimensions to avoid division by zero due to invalid new dimensions.
Partially fixes http://bugzilla.mplayerhq.hu/show_bug.cgi?id=773.
author | reimar |
---|---|
date | Sun, 11 Mar 2007 09:16:11 +0000 |
parents | 056127e5df89 |
children | 255affa5bae7 |
files | rv10.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rv10.c Sun Mar 11 02:13:05 2007 +0000 +++ b/rv10.c Sun Mar 11 09:16:11 2007 +0000 @@ -454,6 +454,8 @@ } 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;