]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/utils.c
Deprecate avcodec_check_dimensions() in favor of the new function
[ffmpeg] / libavcodec / utils.c
index 1d12f69db46c7a0d82f95fbbb726cefa20dd66dc..693b7d8f45005a3ee90775e695f2ea06486b6040 100644 (file)
@@ -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;