Mercurial > libavcodec.hg
diff utils.c @ 12372:914f484bb476 libavcodec
Remove use of the deprecated function avcodec_check_dimensions(), use
av_check_image_size() instead.
author | stefano |
---|---|
date | Fri, 06 Aug 2010 09:37:04 +0000 |
parents | 5dffb531b1cc |
children | ffb3668ff7af |
line wrap: on
line diff
--- a/utils.c Fri Aug 06 09:36:45 2010 +0000 +++ b/utils.c Fri Aug 06 09:37:04 2010 +0000 @@ -235,7 +235,7 @@ return -1; } - if(avcodec_check_dimensions(s,w,h)) + if(av_check_image_size(w, h, 0, s)) return -1; if(s->internal_buffer==NULL){ @@ -487,7 +487,7 @@ #define SANE_NB_CHANNELS 128U if (((avctx->coded_width || avctx->coded_height) - && avcodec_check_dimensions(avctx, avctx->coded_width, avctx->coded_height)) + && av_check_image_size(avctx->coded_width, avctx->coded_height, 0, avctx)) || avctx->channels > SANE_NB_CHANNELS) { ret = AVERROR(EINVAL); goto free_and_end; @@ -554,7 +554,7 @@ av_log(avctx, AV_LOG_ERROR, "buffer smaller than minimum size\n"); return -1; } - if(avcodec_check_dimensions(avctx,avctx->width,avctx->height)) + if(av_check_image_size(avctx->width, avctx->height, 0, avctx)) return -1; if((avctx->codec->capabilities & CODEC_CAP_DELAY) || pict){ int ret = avctx->codec->encode(avctx, buf, buf_size, pict); @@ -604,7 +604,7 @@ int ret; *got_picture_ptr= 0; - if((avctx->coded_width||avctx->coded_height) && avcodec_check_dimensions(avctx,avctx->coded_width,avctx->coded_height)) + if((avctx->coded_width||avctx->coded_height) && av_check_image_size(avctx->coded_width, avctx->coded_height, 0, avctx)) return -1; if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size){ ret = avctx->codec->decode(avctx, picture, got_picture_ptr,