[FFmpeg-cvslog] r17542 - trunk/libavcodec/utils.c

reimar subversion
Mon Feb 23 16:18:28 CET 2009


Author: reimar
Date: Mon Feb 23 16:18:28 2009
New Revision: 17542

Log:
Check return value of ff_fill_pointer in avcodec_default_get_buffer,
if it returns -1 we do not know how to allocate an AVFrame for that format
and must return -1 instead of returning nonsense.

Modified:
   trunk/libavcodec/utils.c

Modified: trunk/libavcodec/utils.c
==============================================================================
--- trunk/libavcodec/utils.c	Mon Feb 23 15:02:11 2009	(r17541)
+++ trunk/libavcodec/utils.c	Mon Feb 23 16:18:28 2009	(r17542)
@@ -271,6 +271,8 @@ int avcodec_default_get_buffer(AVCodecCo
         }
 
         tmpsize = ff_fill_pointer(&picture, NULL, s->pix_fmt, h);
+        if (tmpsize < 0)
+            return -1;
 
         for (i=0; i<3 && picture.data[i+1]; i++)
             size[i] = picture.data[i+1] - picture.data[i];




More information about the ffmpeg-cvslog mailing list