# HG changeset patch # User stefano # Date 1272207916 0 # Node ID 45512d8b6b3592688f60ddaf2d25ec1b596b98a7 # Parent 8a4be9e3f0eef5188826d2e168598b2478d33ce5 Make avcodec_check_dimensions() return AVERROR(EINVAL) rather than -1 in case of invalid picture size. diff -r 8a4be9e3f0ee -r 45512d8b6b35 utils.c --- a/utils.c Fri Apr 23 16:45:38 2010 +0000 +++ b/utils.c Sun Apr 25 15:05:16 2010 +0000 @@ -224,7 +224,7 @@ return 0; av_log(av_log_ctx, AV_LOG_ERROR, "picture size invalid (%ux%u)\n", w, h); - return -1; + return AVERROR(EINVAL); } int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){