[FFmpeg-devel] [PATCH 5/6] Make avcodec_check_dimensions() return AVERROR(EINVAL) rather than -1 in case of invalid picture size.

Stefano Sabatini stefano.sabatini-lala
Sat Apr 24 20:53:24 CEST 2010


---
 libavcodec/utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 34e8ae4..87facec 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -224,7 +224,7 @@ int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h){
         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){
-- 
1.7.0




More information about the ffmpeg-devel mailing list