diff options
author | Martin Storsjö <martin@martin.st> | 2013-10-03 01:52:37 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-10-05 00:01:08 +0300 |
commit | d347a7b248d4ffdc278373fecf033b0ade030343 (patch) | |
tree | a12ed64188325a37d096c28f6c879346aa7c2ee3 | |
parent | b698542ad83284fbb8c22404e3cafeb2dd739d38 (diff) | |
download | ffmpeg-d347a7b248d4ffdc278373fecf033b0ade030343.tar.gz |
ismindex: Use the individual stream duration instead of the global one
The stream duration is used for calculating the duration of the
last fragment easily without manually parsing anything else than
the mfra/tfra atoms. When the global file duration was used
previously, the duration of the last fragment could end up wrong
if the streams weren't equally long.
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | tools/ismindex.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/ismindex.c b/tools/ismindex.c index cf89f5c1e1..64fa7e80c0 100644 --- a/tools/ismindex.c +++ b/tools/ismindex.c @@ -320,8 +320,7 @@ static int handle_file(struct Tracks *tracks, const char *file, int split) track->bitrate = st->codec->bit_rate; track->track_id = st->id; track->timescale = st->time_base.den; - track->duration = av_rescale_rnd(ctx->duration, track->timescale, - AV_TIME_BASE, AV_ROUND_UP); + track->duration = st->duration; track->is_audio = st->codec->codec_type == AVMEDIA_TYPE_AUDIO; track->is_video = st->codec->codec_type == AVMEDIA_TYPE_VIDEO; |