[FFmpeg-cvslog] movenc: fix segfault with chapter tracks
Michael Niedermayer
git at videolan.org
Mon Apr 2 18:15:36 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Apr 2 17:00:20 2012 +0200| [1e059731a376aeddd07f7d61bddf0555cd09ef14] | committer: Michael Niedermayer
movenc: fix segfault with chapter tracks
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1e059731a376aeddd07f7d61bddf0555cd09ef14
---
libavformat/movenc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index dd14a08..73b6c66 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -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);
More information about the ffmpeg-cvslog
mailing list