From 8624aaa41500077f018a3e0485505d9f6a1d9bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 15 Jun 2009 20:11:05 +0100 Subject: [PATCH] queue: fix compiler warning The compiler suggests to add some () to indicate if the && or the || takes priority, so reflow code a bit so we don't have to add yet another layer of (). Hopefully this was the intended meaning of the code. --- plugins/elements/gstqueue.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index be16c0cdef..175fc6b654 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -825,16 +825,18 @@ out_eos: static gboolean gst_queue_is_empty (GstQueue * queue) { + if (queue->queue->length == 0) + return TRUE; + /* It is possible that a max size is reached before all min thresholds are. * Therefore, only consider it empty if it is not filled. */ - return (queue->queue->length == 0 || - ((queue->min_threshold.buffers > 0 && - queue->cur_level.buffers < queue->min_threshold.buffers) || - (queue->min_threshold.bytes > 0 && - queue->cur_level.bytes < queue->min_threshold.bytes) || - (queue->min_threshold.time > 0 && - queue->cur_level.time < queue->min_threshold.time)) && - !gst_queue_is_filled (queue)); + return ((queue->min_threshold.buffers > 0 && + queue->cur_level.buffers < queue->min_threshold.buffers) || + (queue->min_threshold.bytes > 0 && + queue->cur_level.bytes < queue->min_threshold.bytes) || + (queue->min_threshold.time > 0 && + queue->cur_level.time < queue->min_threshold.time)) && + !gst_queue_is_filled (queue); } static gboolean