[gst-cvs] gst-plugins-base: adder: send flush-stop earlier

Wim Taymans wtay at kemper.freedesktop.org
Fri Jun 12 07:32:17 PDT 2009


Module: gst-plugins-base
Branch: master
Commit: 45084bf579efc8aa2e086df321d27e3e18eb3356
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=45084bf579efc8aa2e086df321d27e3e18eb3356

Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Fri Jun 12 16:31:00 2009 +0200

adder: send flush-stop earlier

When no flush-stop has been sent by upstream, we have to send one ourselves to
continue playback. Do this as soon as the collect function is called instead of
after we possibly pushed segment events (that got then flushed out)

---

 gst/adder/gstadder.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c
index 04f5870..b367ebd 100644
--- a/gst/adder/gstadder.c
+++ b/gst/adder/gstadder.c
@@ -906,6 +906,11 @@ gst_adder_collected (GstCollectPads * pads, gpointer user_data)
   if (G_UNLIKELY (adder->func == NULL))
     goto not_negotiated;
 
+  if (adder->flush_stop_pending) {
+    gst_pad_push_event (adder->srcpad, gst_event_new_flush_stop ());
+    adder->flush_stop_pending = FALSE;
+  }
+
   /* get available bytes for reading, this can be 0 which could mean empty
    * buffers or EOS, which we will catch when we loop over the pads. */
   outsize = gst_collect_pads_available (pads);
@@ -1016,10 +1021,6 @@ gst_adder_collected (GstCollectPads * pads, gpointer user_data)
           adder->timestamp, adder->segment_position);
     }
   }
-  if (adder->flush_stop_pending) {
-    gst_pad_push_event (adder->srcpad, gst_event_new_flush_stop ());
-    adder->flush_stop_pending = FALSE;
-  }
 
   /* set timestamps on the output buffer */
   GST_BUFFER_TIMESTAMP (outbuf) = adder->timestamp;





More information about the Gstreamer-commits mailing list