basesink: perform wait_preroll in a while loop
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 25 Nov 2010 15:06:07 +0000 (16:06 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 2 Dec 2010 18:10:45 +0000 (19:10 +0100)
We need to continue calling wait_preroll() as long as the need_preroll variable
is true.

libs/gst/base/gstbasesink.c

index cba028e..cf7ea34 100644 (file)
@@ -2288,7 +2288,7 @@ gst_base_sink_wait_eos (GstBaseSink * sink, GstClockTime time,
     GST_DEBUG_OBJECT (sink, "checking preroll");
 
     /* first wait for the playing state before we can continue */
-    if (G_UNLIKELY (sink->need_preroll)) {
+    while (G_UNLIKELY (sink->need_preroll)) {
       ret = gst_base_sink_wait_preroll (sink);
       if ((ret != GST_FLOW_OK) && (ret != GST_FLOW_STEP))
         goto flushing;