[FFmpeg-cvslog] r25687 - trunk/libavcodec/imgconvert.c

stefano subversion
Sun Nov 7 14:30:37 CET 2010


Author: stefano
Date: Sun Nov  7 14:30:36 2010
New Revision: 25687

Log:
Make avpicture_fill() return a meaningful error code.

Modified:
   trunk/libavcodec/imgconvert.c

Modified: trunk/libavcodec/imgconvert.c
==============================================================================
--- trunk/libavcodec/imgconvert.c	Sun Nov  7 14:01:12 2010	(r25686)
+++ trunk/libavcodec/imgconvert.c	Sun Nov  7 14:30:36 2010	(r25687)
@@ -511,12 +511,13 @@ int ff_fill_pointer(AVPicture *picture, 
 int avpicture_fill(AVPicture *picture, uint8_t *ptr,
                    enum PixelFormat pix_fmt, int width, int height)
 {
+    int ret;
 
-    if(av_image_check_size(width, height, 0, NULL))
-        return -1;
+    if ((ret = av_image_check_size(width, height, 0, NULL)) < 0)
+        return ret;
 
-    if (av_image_fill_linesizes(picture->linesize, pix_fmt, width))
-        return -1;
+    if ((ret = av_image_fill_linesizes(picture->linesize, pix_fmt, width)) < 0)
+        return ret;
 
     return av_image_fill_pointers(picture->data, pix_fmt, height, ptr, picture->linesize);
 }



More information about the ffmpeg-cvslog mailing list