diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-08-06 13:36:45 +0400 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-08-06 13:36:45 +0400 |
commit | bf176f58b79e9bbbcc0eb243d39fda3f2419992c (patch) | |
tree | bc160c982bebab7a533b4deababe8e3c8648e54a /libavcodec/utils.c | |
parent | 85fbad4555448c27e9b40b44663f5bd1dde452d2 (diff) |
Deprecate avcodec_check_dimensions() in favor of the new function
av_check_image_size() declared in libavcore/imgutils.h.
Originally committed as revision 24709 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 1d12f69db4..693b7d8f45 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -213,13 +213,11 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height){ *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; |