queue2: Reset result flow when retrying

If we ever get a GST_FLOW_EOS from downstream, we might retry
pushing new data. But if pushing that data doesn't return a
GstFlowReturn (such as pushing events), we would end up returning
the previous GstFlowReturn (i.e. EOS).

Not properly resetting it would cause cases where queue2 would
stop pushing on the first GstEvent stored (even if there is more
data contained within).
This commit is contained in:
Edward Hervey 2018-10-22 13:45:52 +02:00 committed by Edward Hervey
parent 5658ae9986
commit 98fabd2fa2

View file

@ -2908,7 +2908,7 @@ gst_queue2_dequeue_on_eos (GstQueue2 * queue, GstQueue2ItemType * item_type)
static GstFlowReturn static GstFlowReturn
gst_queue2_push_one (GstQueue2 * queue) gst_queue2_push_one (GstQueue2 * queue)
{ {
GstFlowReturn result = queue->srcresult; GstFlowReturn result;
GstMiniObject *data; GstMiniObject *data;
GstQueue2ItemType item_type; GstQueue2ItemType item_type;
@ -2917,6 +2917,7 @@ gst_queue2_push_one (GstQueue2 * queue)
goto no_item; goto no_item;
next: next:
result = queue->srcresult;
STATUS (queue, queue->srcpad, "We have something dequeud"); STATUS (queue, queue->srcpad, "We have something dequeud");
g_atomic_int_set (&queue->downstream_may_block, g_atomic_int_set (&queue->downstream_may_block,
item_type == GST_QUEUE2_ITEM_TYPE_BUFFER || item_type == GST_QUEUE2_ITEM_TYPE_BUFFER ||