summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2015-10-15 16:32:42 +0200
committerEdward Hervey <bilboed@bilboed.com>2015-10-19 14:31:05 +0200
commit7c8f76a39f248bd7528b72e31460304f7c1a0b48 (patch)
treee7dfb326bbd9c05b76206fca6057657e3d9c7961
parent55fae236d0a8695f19ba8b82b2dc7325245384d2 (diff)
multiqueue: Improve incoming SEGMENT handling
Previously this code was just blindly setting the cached flow return of downstream to GST_FLOW_OK when we get a SEGMENT. The problem is that this can not be done blindly. If downstream was not linked, the corresponding sinqlequeue source pad thread might be waiting for the next ID to be woken up upon. By blindly setting the cached return value to GST_FLOW_OK, and if that stream was the only one that was NOT_LINKED, then the next time we check (from any other thread) to see if we need to wake up a source pad thread ... we won't even try, because none of the cached flow return are equal to GST_FLOW_NOT_LINKED. This would result in that thread never being woken up https://bugzilla.gnome.org/show_bug.cgi?id=756645
-rw-r--r--plugins/elements/gstmultiqueue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c
index 1d90cda6a..f0c9856b7 100644
--- a/plugins/elements/gstmultiqueue.c
+++ b/plugins/elements/gstmultiqueue.c
@@ -1863,7 +1863,8 @@ gst_multi_queue_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
/* a new segment allows us to accept more buffers if we got EOS
* from downstream */
GST_MULTI_QUEUE_MUTEX_LOCK (mq);
- sq->srcresult = GST_FLOW_OK;
+ if (sq->srcresult == GST_FLOW_EOS)
+ sq->srcresult = GST_FLOW_OK;
GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
break;
case GST_EVENT_GAP: