Commit 1e059731 authored by Michael Niedermayer's avatar Michael Niedermayer

movenc: fix segfault with chapter tracks

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c450cf15
......@@ -2887,7 +2887,7 @@ static int mov_write_packet_internal(AVFormatContext *s, AVPacket *pkt)
if (!size) return 0; /* Discard 0 sized packets */
if (trk->entry)
if (trk->entry && pkt->stream_index < s->nb_streams)
frag_duration = av_rescale_q(pkt->dts - trk->cluster[0].dts,
s->streams[pkt->stream_index]->time_base,
AV_TIME_BASE_Q);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment