diff options
author | Reynaldo H. Verdejo Pinochet <reynaldo@collabora.com> | 2012-05-23 23:46:20 -0400 |
---|---|---|
committer | Reynaldo H. Verdejo Pinochet <reynaldo@collabora.com> | 2012-08-15 01:13:34 -0400 |
commit | 23841d95d927d7713c1f941cdcc496813967a330 (patch) | |
tree | febfac58f3f1459f4371c886da5044ae0981cc4b | |
parent | 5d080c1904013f1311ade226b6d29691928dd6e2 (diff) |
Move mutex init to _start() and add missing freeing at _stop()
-rw-r--r-- | sys/android/gstvidroidsink.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/android/gstvidroidsink.c b/sys/android/gstvidroidsink.c index ea7222402..2a55fbf80 100644 --- a/sys/android/gstvidroidsink.c +++ b/sys/android/gstvidroidsink.c @@ -658,6 +658,7 @@ gst_vidroidsink_start (GstBaseSink * sink) GstViDroidImageFmt *format; platform_wrapper_init (); + vidroidsink->flow_lock = g_mutex_new (); g_mutex_lock (vidroidsink->flow_lock); /* Init supported caps list (Right now we just harcode the only one we support) @@ -728,6 +729,10 @@ HANDLE_ERROR: gboolean gst_vidroidsink_stop (GstBaseSink * sink) { + GstViDroidSink *vidroidsink = GST_VIDROIDSINK (sink); + + g_mutex_free (vidroidsink->flow_lock); + vidroidsink->flow_lock = NULL; return TRUE; } @@ -1404,7 +1409,6 @@ gst_vidroidsink_init (GstViDroidSink * vidroidsink, vidroidsink->have_vbo = FALSE; vidroidsink->have_texture = FALSE; vidroidsink->running = FALSE; /* XXX: unused */ - vidroidsink->flow_lock = g_mutex_new (); } /* Interface initializations. Used here for initializing the XOverlay |