提交 c92a2a4e 编写于 作者: A Anton Khirnov

movenc: fix NULL reference in mov_write_tkhd_tag

st may be NULL when there are more mov streams than AVStreams, e.g. when
chapters are present.
上级 f06068bb
......@@ -1217,7 +1217,7 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVTrack *track, AVStream *st)
avio_wb32(pb, 0); /* reserved */
avio_wb32(pb, 0); /* reserved */
avio_wb16(pb, 0); /* layer */
avio_wb16(pb, st->codec->codec_type); /* alternate group) */
avio_wb16(pb, st ? st->codec->codec_type : 0); /* alternate group) */
/* Volume, only for audio */
if(track->enc->codec_type == AVMEDIA_TYPE_AUDIO)
avio_wb16(pb, 0x0100);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册