diff options
author | Edward Hervey <edward@centricular.com> | 2018-10-22 14:45:52 +0300 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2018-10-22 15:00:50 +0300 |
commit | e486a9244b75643c5780a3fce31c851ac31997c9 (patch) | |
tree | 2ce53b4f927abfffc4c0d647d38a7e629373cc8e | |
parent | 3c586dec930c5c253da0cf49e3f3846243f0ecf5 (diff) |
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).
-rw-r--r-- | plugins/elements/gstqueue2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/elements/gstqueue2.c b/plugins/elements/gstqueue2.c index fb5452e37c..2b25e9a241 100644 --- a/plugins/elements/gstqueue2.c +++ b/plugins/elements/gstqueue2.c @@ -2911,7 +2911,7 @@ gst_queue2_dequeue_on_eos (GstQueue2 * queue, GstQueue2ItemType * item_type) static GstFlowReturn gst_queue2_push_one (GstQueue2 * queue) { - GstFlowReturn result = queue->srcresult; + GstFlowReturn result; GstMiniObject *data; GstQueue2ItemType item_type; @@ -2920,6 +2920,7 @@ gst_queue2_push_one (GstQueue2 * queue) goto no_item; next: + result = queue->srcresult; STATUS (queue, queue->srcpad, "We have something dequeud"); g_atomic_int_set (&queue->downstream_may_block, item_type == GST_QUEUE2_ITEM_TYPE_BUFFER || |