From 5ac4ea3f1b77655effba2346bfcaef8f13e7a120 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 23 Jun 2010 11:05:11 +0200 Subject: [PATCH] asfdemux: Allow at least 500ms of preroll. Some files have insanely low preroll values which break the all_streams_prerolled() logic. Fixes #622407 --- gst/asfdemux/gstasfdemux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c index 174db45517..2e86a43d1a 100644 --- a/gst/asfdemux/gstasfdemux.c +++ b/gst/asfdemux/gstasfdemux.c @@ -1112,7 +1112,8 @@ all_streams_prerolled (GstASFDemux * demux) GstClockTime preroll_time; guint i, num_no_data = 0; - preroll_time = demux->preroll; + /* Allow at least 500ms of preroll_time */ + preroll_time = MAX(demux->preroll, 500 * GST_MSECOND); /* returns TRUE as long as there isn't a stream which (a) has data queued * and (b) the timestamp of last piece of data queued is < demux->preroll