summaryrefslogtreecommitdiff
path: root/gst-libs/gst/basecamerabinsrc
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2015-02-17 00:34:55 +0000
committerTim-Philipp Müller <tim@centricular.com>2015-02-17 09:56:55 +0000
commit34c9c86ab78e4d0455e1e776aae28a89f7d14c6d (patch)
treeaed4418dfc5a9b303318f40859c2c24f61009ca8 /gst-libs/gst/basecamerabinsrc
parente9141b718b3f1c3af92898f2982e188ea42b746a (diff)
downloadgstreamer-plugins-bad-34c9c86ab78e4d0455e1e776aae28a89f7d14c6d.tar.gz
basecamerabinsrc: don't use private GMutex implementation details
Don't use private GMutex implementation details to check whether it has been freed already or not. Just clear mutex and GCond unconditionally in free function, they are always inited anyway, and the free function can't be called multiple times either.
Diffstat (limited to 'gst-libs/gst/basecamerabinsrc')
-rw-r--r--gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c
index 06af5b24f..cfdc07421 100644
--- a/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c
+++ b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c
@@ -231,14 +231,9 @@ gst_camerabin_destroy_preview_pipeline (GstCameraBinPreviewPipelineData *
{
g_return_if_fail (preview != NULL);
- if (preview->processing_lock.p) {
- g_mutex_clear (&preview->processing_lock);
- preview->processing_lock.p = NULL;
- }
- if (preview->processing_cond.p) {
- g_cond_clear (&preview->processing_cond);
- preview->processing_cond.p = NULL;
- }
+ g_mutex_clear (&preview->processing_lock);
+ g_cond_clear (&preview->processing_cond);
+
if (preview->pipeline) {
gst_element_set_state (preview->pipeline, GST_STATE_NULL);
gst_object_unref (preview->pipeline);