[FFmpeg-cvslog] mov: Compute max duration among the tracks with a timescale
Luca Barbato
git at videolan.org
Tue Aug 20 12:35:32 CEST 2013
ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Mon Aug 19 17:18:22 2013 +0200| [22de0f8369f1f3edf1a55e1d275f3c07c617b53e] | committer: Luca Barbato
mov: Compute max duration among the tracks with a timescale
Prevent an assert.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=22de0f8369f1f3edf1a55e1d275f3c07c617b53e
---
libavformat/movenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index b41261c..0f21ae2 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1640,7 +1640,7 @@ static int mov_write_mvhd_tag(AVIOContext *pb, MOVMuxContext *mov)
int version;
for (i = 0; i < mov->nb_streams; i++) {
- if (mov->tracks[i].entry > 0) {
+ if (mov->tracks[i].entry > 0 && mov->tracks[i].timescale) {
max_track_len_temp = av_rescale_rnd(mov->tracks[i].track_duration,
MOV_TIMESCALE,
mov->tracks[i].timescale,
More information about the ffmpeg-cvslog
mailing list