diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-06-12 16:31:00 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-06-12 16:31:00 +0200 |
commit | 45084bf579efc8aa2e086df321d27e3e18eb3356 (patch) | |
tree | d0f7f73c25353ea922c32249f45016437e714d25 | |
parent | 22cdc527a5e6b9616eba2a4d51e55847ea81d433 (diff) |
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)
-rw-r--r-- | 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 04f58707e..b367ebd07 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; |