/* 0 means that we already received the right caps or segment */
gint seqnum_to_restart_task;
- gboolean waiting_for_buffer;
+ gboolean waiting_serialized_query_or_buffer;
gboolean tearing_down_stack;
NleCompositionPrivate *priv = comp->priv;
GstEvent *event;
- if (GST_IS_BUFFER (info->data)) {
- if (priv->waiting_for_buffer) {
+ if (GST_IS_BUFFER (info->data) ||
+ (GST_IS_QUERY (info->data) && GST_QUERY_IS_SERIALIZED (info->data))) {
+ if (priv->waiting_serialized_query_or_buffer) {
GST_INFO_OBJECT (comp, "update_pipeline DONE");
_restart_task (comp);
}
priv->ghosteventprobe =
gst_pad_add_probe (target,
GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM | GST_PAD_PROBE_TYPE_EVENT_FLUSH |
- GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM,
+ GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM |
+ GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM,
(GstPadProbeCallback) ghost_event_probe_handler, comp, NULL);
GST_DEBUG_OBJECT (comp, "added event probe %lu", priv->ghosteventprobe);
}
G_PRIORITY_HIGH);
comp->priv->seqnum_to_restart_task = 0;
- comp->priv->waiting_for_buffer = FALSE;
+ comp->priv->waiting_serialized_query_or_buffer = FALSE;
comp->priv->updating_reason = COMP_UPDATE_STACK_NONE;
GST_OBJECT_LOCK (comp);
return TRUE;
}
- priv->waiting_for_buffer = TRUE;
+ priv->waiting_serialized_query_or_buffer = TRUE;
return FALSE;
} else if (comp->priv->seqnum_to_restart_task) {