shell-recorder-src: Statically init mutexes instead of using the deprecated API
https://bugzilla.gnome.org/show_bug.cgi?id=662011
This commit is contained in:
parent
36eb745ecc
commit
338ba10ca2
@ -10,6 +10,7 @@ struct _ShellRecorderSrc
|
|||||||
{
|
{
|
||||||
GstPushSrc parent;
|
GstPushSrc parent;
|
||||||
|
|
||||||
|
GMutex mutex_data;
|
||||||
GMutex *mutex;
|
GMutex *mutex;
|
||||||
|
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
@ -40,7 +41,8 @@ shell_recorder_src_init (ShellRecorderSrc *src,
|
|||||||
ShellRecorderSrcClass *klass)
|
ShellRecorderSrcClass *klass)
|
||||||
{
|
{
|
||||||
src->queue = g_async_queue_new ();
|
src->queue = g_async_queue_new ();
|
||||||
src->mutex = g_mutex_new ();
|
src->mutex = &src->mutex_data;
|
||||||
|
g_mutex_init (src->mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -140,7 +142,7 @@ shell_recorder_src_finalize (GObject *object)
|
|||||||
shell_recorder_src_set_caps (src, NULL);
|
shell_recorder_src_set_caps (src, NULL);
|
||||||
g_async_queue_unref (src->queue);
|
g_async_queue_unref (src->queue);
|
||||||
|
|
||||||
g_mutex_free (src->mutex);
|
g_mutex_clear (src->mutex);
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user