summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorArun Raghavan <arun@osg.samsung.com>2016-12-08 11:22:38 +0530
committerArun Raghavan <arun@arunraghavan.net>2016-12-08 11:22:38 +0530
commit6a0d53b767be43e937d530dc5b42beb2e71251ab (patch)
treefc759d3d8f8427c9da88c33290aed2c8612b9223 /gst-libs
parentf149f6bc0ebcd7856813934a457deae17159a174 (diff)
downloadgstreamer-plugins-bad-6a0d53b767be43e937d530dc5b42beb2e71251ab.tar.gz
player: Don't try to cache the GQuark for GST_PLAYER_ERROR
This is potentially racy (in the unlikely scenario that we get two first-time calls to gst_player_error_quark() at the same time). This should not impact anything in terms of performance since it's only on the error path. The call itself could just be inlined by making GST_PLAYER_ERROR be defined to the g_quark_from_static_string() call, but this feels ugly from an API perspective.
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/player/gstplayer.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gst-libs/gst/player/gstplayer.c b/gst-libs/gst/player/gstplayer.c
index f92f09e67..cac55cb1e 100644
--- a/gst-libs/gst/player/gstplayer.c
+++ b/gst-libs/gst/player/gstplayer.c
@@ -70,12 +70,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_player_debug);
GQuark
gst_player_error_quark (void)
{
- static GQuark quark;
-
- if (!quark)
- quark = g_quark_from_static_string ("gst-player-error-quark");
-
- return quark;
+ return g_quark_from_static_string ("gst-player-error-quark");
}
static GQuark QUARK_CONFIG;