From: Michael Smith Date: Wed, 3 Oct 2012 17:51:45 +0000 (-0700) Subject: meta info: threadsafe registration using g_once X-Git-Tag: 1.19.3~509^2~6484 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b04b1b5089a2891d8da53e3e6bd4d6d78b977214;p=platform%2Fupstream%2Fgstreamer.git meta info: threadsafe registration using g_once --- diff --git a/gst/interleave/deinterleave.c b/gst/interleave/deinterleave.c index f85dfca..9784cf1 100644 --- a/gst/interleave/deinterleave.c +++ b/gst/interleave/deinterleave.c @@ -759,6 +759,8 @@ gst_deinterleave_process (GstDeinterleave * self, GstBuffer * buf) if (!pads_pushed) ret = GST_FLOW_NOT_LINKED; + GST_DEBUG_OBJECT (self, "Pushed on %d pads", pads_pushed); + done: gst_buffer_unmap (buf, &read_info); gst_buffer_unref (buf); diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c index 897231d..f6fabbb 100644 --- a/sys/v4l2/gstv4l2bufferpool.c +++ b/sys/v4l2/gstv4l2bufferpool.c @@ -75,11 +75,12 @@ gst_v4l2_meta_get_info (void) { static const GstMetaInfo *meta_info = NULL; - if (meta_info == NULL) { - meta_info = + if (g_once_init_enter (&meta_info)) { + const GstMetaInfo *meta = gst_meta_register (gst_v4l2_meta_api_get_type (), "GstV4l2Meta", sizeof (GstV4l2Meta), (GstMetaInitFunction) NULL, (GstMetaFreeFunction) NULL, (GstMetaTransformFunction) NULL); + g_once_init_leave (&meta_info, meta); } return meta_info; } diff --git a/sys/ximage/ximageutil.c b/sys/ximage/ximageutil.c index d81e9a4..35069fc 100644 --- a/sys/ximage/ximageutil.c +++ b/sys/ximage/ximageutil.c @@ -41,11 +41,12 @@ gst_meta_ximage_get_info (void) { static const GstMetaInfo *meta_ximage_info = NULL; - if (meta_ximage_info == NULL) { - meta_ximage_info = + if (g_once_init_enter (&meta_ximage_info)) { + const GstMetaInfo *meta = gst_meta_register (gst_meta_ximage_api_get_type (), "GstMetaXImageSrc", sizeof (GstMetaXImage), (GstMetaInitFunction) NULL, (GstMetaFreeFunction) NULL, (GstMetaTransformFunction) NULL); + g_once_init_leave (&meta_ximage_info, meta); } return meta_ximage_info; }