[FFmpeg-cvslog] ismindex: Use the individual stream duration instead of the global one
Martin Storsjö
git at videolan.org
Sat Oct 5 11:28:00 CEST 2013
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Thu Oct 3 01:52:37 2013 +0300| [d347a7b248d4ffdc278373fecf033b0ade030343] | committer: Martin Storsjö
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 at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d347a7b248d4ffdc278373fecf033b0ade030343
---
tools/ismindex.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/ismindex.c b/tools/ismindex.c
index cf89f5c..64fa7e8 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;
More information about the ffmpeg-cvslog
mailing list