浏览代码

fail if stream fifo could not be allocated

Originally committed as revision 18897 to svn://svn.ffmpeg.org/ffmpeg/trunk
Baptiste Coudurier 16 年之前
父节点
当前提交
4969cc0bd8
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      libavformat/mpegenc.c

+ 2 - 0
libavformat/mpegenc.c

@@ -382,6 +382,8 @@ static int mpeg_mux_init(AVFormatContext *ctx)
             return -1;
         }
         stream->fifo= av_fifo_alloc(16);
+        if (!stream->fifo)
+            goto fail;
     }
     bitrate = 0;
     audio_bitrate = 0;