diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-05 11:28:58 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-05 11:29:02 +0200 |
commit | 47a57c6832d008f676837a9ee5f3a45b828c9ca1 (patch) | |
tree | 61d8786e0f0560e97cc7c1cf1353ce6bb5663464 /tools | |
parent | 5de251a3e32e75c01bfc0c66be628fb9f07fdd04 (diff) | |
parent | 583a287f6f48f263859df142e6f90993e4217c72 (diff) | |
download | ffmpeg-47a57c6832d008f676837a9ee5f3a45b828c9ca1.tar.gz |
Merge commit '583a287f6f48f263859df142e6f90993e4217c72'
* commit '583a287f6f48f263859df142e6f90993e4217c72':
ismindex: Calculate the file duration among the included tracks
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/ismindex.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/ismindex.c b/tools/ismindex.c index 9b4d5717e7..b1877904b3 100644 --- a/tools/ismindex.c +++ b/tools/ismindex.c @@ -298,8 +298,6 @@ static int handle_file(struct Tracks *tracks, const char *file, int split) fprintf(stderr, "No streams found in %s\n", file); goto fail; } - if (!tracks->duration) - tracks->duration = ctx->duration; for (i = 0; i < ctx->nb_streams; i++) { struct Track **temp; @@ -338,6 +336,10 @@ static int handle_file(struct Tracks *tracks, const char *file, int split) continue; } + tracks->duration = FFMAX(tracks->duration, + av_rescale_rnd(track->duration, AV_TIME_BASE, + track->timescale, AV_ROUND_UP)); + if (track->is_audio) { if (tracks->audio_track < 0) tracks->audio_track = tracks->nb_tracks; |