From 33ded76ab8eafb9718460c8a01377b9f408124ea Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 14 Dec 2015 11:20:43 +0100 Subject: [PATCH] queue/multiqueue: Don't special-case CAPS events in the event handlers For CAPS events we will never ever have a FALSE return value here, so just remove the dead code instead of causing future confusion. --- plugins/elements/gstmultiqueue.c | 11 +++-------- plugins/elements/gstqueue.c | 5 +---- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c index b19daa4..bd0b06c 100644 --- a/plugins/elements/gstmultiqueue.c +++ b/plugins/elements/gstmultiqueue.c @@ -2049,7 +2049,7 @@ gst_multi_queue_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) "SingleQueue %d : Enqueuing event %p of type %s with id %d", sq->id, event, GST_EVENT_TYPE_NAME (event), curid); - if (!(res = gst_data_queue_push (sq->queue, (GstDataQueueItem *) item))) + if (!gst_data_queue_push (sq->queue, (GstDataQueueItem *) item)) goto flushing; /* mark EOS when we received one, we must do that after putting the @@ -2099,12 +2099,8 @@ gst_multi_queue_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) } done: - if (res == FALSE) { - if (GST_EVENT_TYPE (event) == GST_EVENT_CAPS) - flowret = GST_FLOW_NOT_NEGOTIATED; - else - flowret = GST_FLOW_ERROR; - } + if (res == FALSE) + flowret = GST_FLOW_ERROR; GST_DEBUG_OBJECT (mq, "SingleQueue %d : returning %s", sq->id, gst_flow_get_name (flowret)); return flowret; @@ -2122,7 +2118,6 @@ was_eos: { GST_DEBUG_OBJECT (mq, "we are EOS, dropping event, return GST_FLOW_EOS"); gst_event_unref (event); - res = FALSE; return GST_FLOW_EOS; } } diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index 6d9810f..72c915d 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -985,11 +985,8 @@ gst_queue_handle_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) } break; } - if (ret == FALSE) { - if (GST_EVENT_TYPE (event) == GST_EVENT_CAPS) - return GST_FLOW_NOT_NEGOTIATED; + if (ret == FALSE) return GST_FLOW_ERROR; - } return GST_FLOW_OK; /* ERRORS */ -- 2.7.4