]> git.sesse.net Git - ffmpeg/commitdiff
mpegvideoenc: check return value of ff_MPV_frame_start()
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 18 Oct 2012 19:42:31 +0000 (21:42 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 18 Oct 2012 19:42:31 +0000 (21:42 +0200)
Fixes CID703622
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpegvideo_enc.c

index 108db506c91f6de8f2c336d4f2616dce01cf523b..32e1772cf344401d24883380ca0f0a0e1ac9c2b1 100644 (file)
@@ -1501,7 +1501,8 @@ int ff_MPV_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
 
         s->pict_type = s->new_picture.f.pict_type;
         //emms_c();
-        ff_MPV_frame_start(s, avctx);
+        if (ff_MPV_frame_start(s, avctx) < 0)
+            return -1;
 vbv_retry:
         if (encode_picture(s, s->picture_number) < 0)
             return -1;