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.
This commit is contained in:
Tim-Philipp Müller 2009-06-15 20:11:05 +01:00
parent 34aeb8ba7e
commit 8624aaa415

View file

@ -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