Mercurial > libavcodec.hg
diff utils.c @ 12371:5dffb531b1cc libavcodec
Deprecate avcodec_check_dimensions() in favor of the new function
av_check_image_size() declared in libavcore/imgutils.h.
author | stefano |
---|---|
date | Fri, 06 Aug 2010 09:36:45 +0000 |
parents | 035ca6548e29 |
children | 914f484bb476 |
line wrap: on
line diff
--- a/utils.c Fri Aug 06 07:09:12 2010 +0000 +++ b/utils.c Fri Aug 06 09:36:45 2010 +0000 @@ -213,13 +213,11 @@ *width=FFALIGN(*width, align); } +#if LIBAVCODEC_VERSION_MAJOR < 53 int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h){ - if((int)w>0 && (int)h>0 && (w+128)*(uint64_t)(h+128) < INT_MAX/8) - return 0; - - av_log(av_log_ctx, AV_LOG_ERROR, "picture size invalid (%ux%u)\n", w, h); - return AVERROR(EINVAL); + return av_check_image_size(w, h, 0, av_log_ctx); } +#endif int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){ int i;