changeset 9014:1de11a984fc6 libavcodec

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.
author reimar
date Mon, 23 Feb 2009 15:18:28 +0000
parents b54938038170
children a50419dcda53
files utils.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Mon Feb 23 14:02:11 2009 +0000
+++ b/utils.c	Mon Feb 23 15:18:28 2009 +0000
@@ -271,6 +271,8 @@
         }
 
         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];