changeset 2400:fcaecfb05781 libavformat

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
author michael
date Sat, 18 Aug 2007 00:52:05 +0000
parents e1fdab28da80
children c356a88cedf6
files utils.c
diffstat 1 files changed, 0 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Sat Aug 18 00:45:44 2007 +0000
+++ b/utils.c	Sat Aug 18 00:52:05 2007 +0000
@@ -1537,14 +1537,6 @@
     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)