Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gstreamer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu@centricular.com>2021-09-09 21:25:25 +0300
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-10-29 14:14:28 +0300
commit33ea698ef39c115b13eb654a289f2ded9d713fbf (patch)
treeefa59037febb9e97457a10b34ec259e1e8ad9c94
parent8eebe19cae32764097d9ed55340a730736282275 (diff)
multiqueue: never consider a queue that is not waiting
.. when computing the high id. After a flush for instance, sq->srcresult is reset to OK, yet it doesn't make sense to pick a non-existing position id as the high id when a queue doesn't contain any items in that situation either. It is in any case completely OK to let the not-linked stream get consumed without throttling at this stage, as any first packet arriving on other single queues will get assigned a higher position id. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1271>
-rw-r--r--plugins/elements/gstmultiqueue.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c
index 580478d9e7..ff504a0c9e 100644
--- a/plugins/elements/gstmultiqueue.c
+++ b/plugins/elements/gstmultiqueue.c
@@ -2972,14 +2972,14 @@ compute_high_id (GstMultiQueue * mq)
GST_LOG_OBJECT (mq, "inspecting sq:%d , nextid:%d, oldid:%d, srcresult:%s",
sq->id, sq->nextid, sq->oldid, gst_flow_get_name (sq->srcresult));
- if (sq->srcresult == GST_FLOW_NOT_LINKED) {
- /* No need to consider queues which are not waiting */
- if (sq->nextid == 0) {
- GST_LOG_OBJECT (mq, "sq:%d is not waiting - ignoring", sq->id);
- gst_object_unref (srcpad);
- continue;
- }
+ /* No need to consider queues which are not waiting */
+ if (sq->nextid == 0) {
+ GST_LOG_OBJECT (mq, "sq:%d is not waiting - ignoring", sq->id);
+ gst_object_unref (srcpad);
+ continue;
+ }
+ if (sq->srcresult == GST_FLOW_NOT_LINKED) {
if (sq->nextid < lowest)
lowest = sq->nextid;
} else if (!GST_PAD_IS_EOS (srcpad) && sq->srcresult != GST_FLOW_EOS) {