]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/svq1enc.c
tiffdec: support LZW compression with inverted FillOrder
[ffmpeg] / libavcodec / svq1enc.c
index 216fa3b062fa24523377fe6eb8bc067a286c383e..2850ab028466b928dec6e060d5538cd745b18c15 100644 (file)
@@ -547,8 +547,10 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     }
 
     if (!s->current_picture.data[0]) {
-        ff_get_buffer(avctx, &s->current_picture);
-        ff_get_buffer(avctx, &s->last_picture);
+        if ((ret = ff_get_buffer(avctx, &s->current_picture) < 0) ||
+            (ret = ff_get_buffer(avctx, &s->last_picture))   < 0) {
+            return ret;
+        }
         s->scratchbuf = av_malloc(s->current_picture.linesize[0] * 16 * 2);
     }