Return the correct flow return instead of returning always flushing.
This would cause queue2 to convert not-linked to flushing and making
upstream elements stop.
https://bugzilla.gnome.org/show_bug.cgi?id=776999
GST_QUEUE2_MUTEX_UNLOCK (queue);
gst_queue2_post_buffering (queue);
} else {
GST_QUEUE2_MUTEX_UNLOCK (queue);
gst_queue2_post_buffering (queue);
} else {
- /* non-serialized events are passed upstream. */
+ /* non-serialized events are passed downstream. */
ret = gst_pad_push_event (queue->srcpad, event);
}
break;
ret = gst_pad_push_event (queue->srcpad, event);
}
break;
/* ERRORS */
out_flushing:
{
/* ERRORS */
out_flushing:
{
- GST_DEBUG_OBJECT (queue, "refusing event, we are flushing");
+ GstFlowReturn ret = queue->sinkresult;
+ GST_DEBUG_OBJECT (queue, "refusing event, we are %s",
+ gst_flow_get_name (ret));
GST_QUEUE2_MUTEX_UNLOCK (queue);
gst_event_unref (event);
GST_QUEUE2_MUTEX_UNLOCK (queue);
gst_event_unref (event);
- return GST_FLOW_FLUSHING;
/* ERRORS */
out_flushing:
{
/* ERRORS */
out_flushing:
{
- GST_DEBUG_OBJECT (queue, "refusing query, we are flushing");
+ GST_DEBUG_OBJECT (queue, "refusing query, we are %s",
+ gst_flow_get_name (queue->sinkresult));
GST_QUEUE2_MUTEX_UNLOCK (queue);
return FALSE;
}
GST_QUEUE2_MUTEX_UNLOCK (queue);
return FALSE;
}
- GST_CAT_LOG_OBJECT (queue_dataflow, queue, "exit because we are flushing");
- return GST_FLOW_FLUSHING;
+ GST_CAT_LOG_OBJECT (queue_dataflow, queue, "exit because we are %s",
+ gst_flow_get_name (queue->srcresult));
+ return queue->srcresult;
{
ret = queue->srcresult;
{
ret = queue->srcresult;
- GST_DEBUG_OBJECT (queue, "we are flushing");
+ GST_DEBUG_OBJECT (queue, "we are %s", gst_flow_get_name (ret));
GST_QUEUE2_MUTEX_UNLOCK (queue);
return ret;
}
GST_QUEUE2_MUTEX_UNLOCK (queue);
return ret;
}