wavparse: flush upstream when seeking in pull mode
authorThiago Santos <thiagoss@osg.samsung.com>
Tue, 1 Dec 2015 03:03:21 +0000 (00:03 -0300)
committerThiago Santos <thiagoss@osg.samsung.com>
Tue, 1 Dec 2015 03:04:09 +0000 (00:04 -0300)
Makes sure upstream will unblock and return the thread so that
seeking can continue

https://bugzilla.gnome.org/show_bug.cgi?id=758861

gst/wavparse/gstwavparse.c

index ab0bedd..f55b760 100644 (file)
@@ -465,6 +465,7 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event)
    * blocking in preroll). */
   if (flush) {
     GST_DEBUG_OBJECT (wav, "sending flush start");
+    gst_pad_push_event (wav->sinkpad, gst_event_new_flush_start ());
     gst_pad_push_event (wav->srcpad, gst_event_new_flush_start ());
   } else {
     gst_pad_pause_task (wav->sinkpad);
@@ -546,6 +547,7 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event)
   if (flush) {
     /* if we sent a FLUSH_START, we now send a FLUSH_STOP */
     GST_DEBUG_OBJECT (wav, "sending flush stop");
+    gst_pad_push_event (wav->sinkpad, gst_event_new_flush_stop (TRUE));
     gst_pad_push_event (wav->srcpad, gst_event_new_flush_stop (TRUE));
   }