Commit 3a915b4b authored by michael's avatar michael

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 on 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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10139 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 740de0af
...@@ -1537,14 +1537,6 @@ static void av_estimate_timings_from_pts(AVFormatContext *ic, offset_t old_offse ...@@ -1537,14 +1537,6 @@ static void av_estimate_timings_from_pts(AVFormatContext *ic, offset_t old_offse
for(;;) { for(;;) {
if (read_size >= DURATION_MAX_READ_SIZE) if (read_size >= DURATION_MAX_READ_SIZE)
break; 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); ret = av_read_packet(ic, pkt);
if (ret != 0) if (ret != 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment