]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libschroedinger.c
mpegvideo: dont call draw edges on lowres
[ffmpeg] / libavcodec / libschroedinger.c
index 631035e2404cc676e06e98618a8a087d9cb6f448..23bcf2d1368bf574fe807f81179aec317b0e3452 100644 (file)
@@ -189,7 +189,10 @@ SchroFrame *ff_create_schro_frame(AVCodecContext *avccontext,
     uv_height = y_height >> (SCHRO_FRAME_FORMAT_V_SHIFT(schro_frame_fmt));
 
     p_pic = av_mallocz(sizeof(AVPicture));
-    avpicture_alloc(p_pic, avccontext->pix_fmt, y_width, y_height);
+    if (!p_pic || avpicture_alloc(p_pic, avccontext->pix_fmt, y_width, y_height) < 0) {
+        av_free(p_pic);
+        return NULL;
+    }
 
     p_frame         = schro_frame_new();
     p_frame->format = schro_frame_fmt;