summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-11-28 14:17:54 +0100
committerSebastian Dröge <sebastian@centricular.com>2014-12-01 09:51:37 +0100
commit154eefecc93b69c6af8040ceef5f004e595a827f (patch)
treefdda1093ac700aa2ac17268ba37c69aa8ac2b209 /docs
parentf2e4c255880b199bd3b3b41286a41f6c14a02f51 (diff)
Don't compare booleans for equality to TRUE and FALSE
TRUE is 1, but every other non-zero value is also considered true. Comparing for equality with TRUE would only consider 1 but not the others. Also normalize booleans in a few places.
Diffstat (limited to 'docs')
-rw-r--r--docs/manual/advanced-buffering.xml6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/manual/advanced-buffering.xml b/docs/manual/advanced-buffering.xml
index 72fc96f22..7facd8543 100644
--- a/docs/manual/advanced-buffering.xml
+++ b/docs/manual/advanced-buffering.xml
@@ -73,7 +73,7 @@
}
} else {
/* buffering busy */
- if (buffering == FALSE && target_state == GST_STATE_PLAYING) {
+ if (!buffering && target_state == GST_STATE_PLAYING) {
/* we were not buffering but PLAYING, PAUSE the pipeline. */
gst_element_set_state (pipeline, GST_STATE_PAUSED);
}
@@ -349,7 +349,7 @@ on_message_buffering (GstBus *bus, GstMessage *message, gpointer user_data)
if (percent < 100) {
/* buffering busy */
- if (is_buffering == FALSE) {
+ if (!is_buffering) {
is_buffering = TRUE;
if (target_state == GST_STATE_PLAYING) {
/* we were not buffering but PLAYING, PAUSE the pipeline. */
@@ -364,7 +364,7 @@ on_message_async_done (GstBus *bus, GstMessage *message, gpointer user_data)
{
GstElement *pipeline = user_data;
- if (is_buffering == FALSE)
+ if (!is_buffering)
gst_element_set_state (pipeline, target_state);
else
g_timeout_add (500, buffer_timeout, pipeline);