mirror of https://git.ffmpeg.org/ffmpeg.git
Merge commit '583a287f6f48f263859df142e6f90993e4217c72'
* commit '583a287f6f48f263859df142e6f90993e4217c72': ismindex: Calculate the file duration among the included tracks Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
47a57c6832
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue