diff options
author | Neil Brown <neilb@suse.de> | 2007-08-18 00:52:05 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-08-18 00:52:05 +0000 |
commit | d6a0906ad12024096352fa02b45cf0411356ce41 (patch) | |
tree | e31da58db9afd2a324652e7b4f2674a7ef1c746a | |
parent | bf494092b03f107e35ab6ad70be324f23a193c2b (diff) | |
download | ffmpeg-d6a0906ad12024096352fa02b45cf0411356ce41.tar.gz |
When looking for the last packet in each
stream, so as to calculate the duration, don't stop
as soon as all streams have seen at least one packet.
Otherwise the duration will be shorter than it
should be. We must keep reading to the end-of-file.
patch by neilb suse de
Originally committed as revision 10139 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/utils.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 0eba3e619c..6583ec84c4 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1537,14 +1537,6 @@ static void av_estimate_timings_from_pts(AVFormatContext *ic, offset_t old_offse for(;;) { if (read_size >= DURATION_MAX_READ_SIZE) break; - /* if all info is available, we can stop */ - for(i = 0;i < ic->nb_streams; i++) { - st = ic->streams[i]; - if (st->duration == AV_NOPTS_VALUE) - break; - } - if (i == ic->nb_streams) - break; ret = av_read_packet(ic, pkt); if (ret != 0) |