mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
composition: only flush stop after seek was set to READY.
This commit is contained in:
parent
ee54d98fe2
commit
4dd0b6fe14
1 changed files with 10 additions and 5 deletions
|
@ -1875,12 +1875,12 @@ _set_current_bin_to_ready (GnlComposition * comp, gboolean flush_downstream)
|
||||||
gint probe_id = -1;
|
gint probe_id = -1;
|
||||||
GstPad *ptarget = NULL;
|
GstPad *ptarget = NULL;
|
||||||
GnlCompositionPrivate *priv = comp->priv;
|
GnlCompositionPrivate *priv = comp->priv;
|
||||||
|
GstEvent *flush_event;
|
||||||
|
|
||||||
comp->priv->tearing_down_stack = TRUE;
|
comp->priv->tearing_down_stack = TRUE;
|
||||||
if (flush_downstream) {
|
if (flush_downstream) {
|
||||||
ptarget = gst_ghost_pad_get_target (GST_GHOST_PAD (GNL_OBJECT_SRC (comp)));
|
ptarget = gst_ghost_pad_get_target (GST_GHOST_PAD (GNL_OBJECT_SRC (comp)));
|
||||||
if (ptarget) {
|
if (ptarget) {
|
||||||
GstEvent *flush_event;
|
|
||||||
|
|
||||||
/* Make sure that between the flush_start/flush_stop
|
/* Make sure that between the flush_start/flush_stop
|
||||||
* and the time we set the current_bin to READY, no
|
* and the time we set the current_bin to READY, no
|
||||||
|
@ -1898,21 +1898,26 @@ _set_current_bin_to_ready (GnlComposition * comp, gboolean flush_downstream)
|
||||||
priv->flush_seqnum);
|
priv->flush_seqnum);
|
||||||
gst_pad_push_event (ptarget, flush_event);
|
gst_pad_push_event (ptarget, flush_event);
|
||||||
|
|
||||||
flush_event = gst_event_new_flush_stop (TRUE);
|
|
||||||
gst_event_set_seqnum (flush_event, priv->flush_seqnum);
|
|
||||||
gst_pad_push_event (ptarget, flush_event);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_element_set_locked_state (priv->current_bin, TRUE);
|
gst_element_set_locked_state (priv->current_bin, TRUE);
|
||||||
gst_element_set_state (priv->current_bin, GST_STATE_READY);
|
gst_element_set_state (priv->current_bin, GST_STATE_READY);
|
||||||
comp->priv->tearing_down_stack = FALSE;
|
|
||||||
|
|
||||||
if (ptarget) {
|
if (ptarget) {
|
||||||
|
if (flush_downstream)
|
||||||
|
{
|
||||||
|
flush_event = gst_event_new_flush_stop (TRUE);
|
||||||
|
gst_event_set_seqnum (flush_event, priv->flush_seqnum);
|
||||||
|
gst_pad_push_event (ptarget, flush_event);
|
||||||
|
}
|
||||||
|
|
||||||
gst_pad_remove_probe (ptarget, probe_id);
|
gst_pad_remove_probe (ptarget, probe_id);
|
||||||
gst_object_unref (ptarget);
|
gst_object_unref (ptarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
comp->priv->tearing_down_stack = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Must be called with OBJECTS_LOCK taken */
|
/* Must be called with OBJECTS_LOCK taken */
|
||||||
|
|
Loading…
Reference in a new issue