提交 d06735a3 编写于 作者: D David Conrad

matroskaenc: Check that tracks was allocated

Originally committed as revision 23477 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 1f4280e7
......@@ -703,6 +703,8 @@ static int mkv_write_header(AVFormatContext *s)
av_lfg_init(&mkv->lfg, av_get_random_seed());
mkv->tracks = av_mallocz(s->nb_streams * sizeof(*mkv->tracks));
if (!mkv->tracks)
return AVERROR(ENOMEM);
ebml_header = start_ebml_master(pb, EBML_ID_HEADER, 0);
put_ebml_uint (pb, EBML_ID_EBMLVERSION , 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册