summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-02-24 18:43:45 +0100
committerWim Taymans <wim.taymans@collabora.co.uk>2009-02-24 18:44:54 +0100
commitb725e1d2c694e7eb703084fc90db794f65b42586 (patch)
treee77c98cf2c00e08f4d25be3bb7af35e9e23df36b
parentb8af1223db33a929df6c792516f4f3c3a7087a28 (diff)
Add some G_UNLIKELY because we can
Add a G_UNLIKELY when checking the shutdown variable.
-rw-r--r--gst/playback/gstplaybin2.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c
index f824b8017..b033a5889 100644
--- a/gst/playback/gstplaybin2.c
+++ b/gst/playback/gstplaybin2.c
@@ -329,15 +329,15 @@ struct _GstSourceGroup
#define GST_PLAY_BIN_DYN_UNLOCK(bin) g_mutex_unlock ((bin)->dyn_lock)
/* lock for shutdown */
-#define GST_PLAY_BIN_SHUTDOWN_LOCK(bin,label) \
-G_STMT_START { \
- if (g_atomic_int_get (&bin->shutdown)) \
- goto label; \
- GST_PLAY_BIN_DYN_LOCK (bin); \
- if (g_atomic_int_get (&bin->shutdown)) { \
- GST_PLAY_BIN_DYN_UNLOCK (bin); \
- goto label; \
- } \
+#define GST_PLAY_BIN_SHUTDOWN_LOCK(bin,label) \
+G_STMT_START { \
+ if (G_UNLIKELY (g_atomic_int_get (&bin->shutdown))) \
+ goto label; \
+ GST_PLAY_BIN_DYN_LOCK (bin); \
+ if (G_UNLIKELY (g_atomic_int_get (&bin->shutdown))) { \
+ GST_PLAY_BIN_DYN_UNLOCK (bin); \
+ goto label; \
+ } \
} G_STMT_END
/* unlock for shutdown */