nlecomposition: Activate the composition ghostpad to flush downstream

Since commit 060b16ac75
"pad: don't accept flush-stop on inactive pads" in -core, the flush_stop event will not be
fowarded downstream in case the pad is not activated. In our case the element is in
READY state, so pads are deactivated. In that commit we simply make sure that the
event can be fowarded downstream
This commit is contained in:
Thibault Saunier 2014-09-19 12:52:45 +02:00
parent 02665dae91
commit 3e79e28213

View file

@ -2042,7 +2042,13 @@ _set_current_bin_to_ready (NleComposition * comp, gboolean flush_downstream)
if (flush_downstream) {
flush_event = gst_event_new_flush_stop (TRUE);
gst_event_set_seqnum (flush_event, priv->flush_seqnum);
/* Force ad activation so that the event can actually travel.
* Not doing that would lead to the event being discarded.
*/
gst_pad_set_active (ptarget, TRUE);
gst_pad_push_event (ptarget, flush_event);
gst_pad_set_active (ptarget, FALSE);
}
gst_pad_remove_probe (ptarget, probe_id);