changeset 35449:07b1f01495ee

Make stream eof detection less sensitive. Fixes bug #2111.
author reimar
date Fri, 30 Nov 2012 22:16:16 +0000
parents f4828b517f4a
children 31a5320909f7
files libmpdemux/demuxer.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demuxer.c	Fri Nov 30 22:12:17 2012 +0000
+++ b/libmpdemux/demuxer.c	Fri Nov 30 22:16:16 2012 +0000
@@ -710,7 +710,10 @@
         // avoid buffering too far ahead in e.g. badly interleaved files
         // or when one stream is shorter, without breaking large audio
         // delay with well interleaved files.
-        if (ds->fill_count > 20)
+        // This needs to be enough for at least 1 second of packets
+        // since libavformat mov demuxer does not try to interleave
+        // with more than 1s precision.
+        if (ds->fill_count > 80)
             break;
         // avoid printing the "too many ..." message over and over
         if (ds->eof)