mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 06:26:23 +00:00
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:
parent
34aeb8ba7e
commit
8624aaa415
1 changed files with 10 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue