summaryrefslogtreecommitdiff
path: root/gst/camerabin2
diff options
context:
space:
mode:
authorThiago Santos <thiagoss@osg.samsung.com>2015-01-05 21:26:22 -0300
committerThiago Santos <thiagoss@osg.samsung.com>2015-01-05 21:33:47 -0300
commit04e2a38ae3d8323a880a040fbcff5fd7e8ddda4c (patch)
tree7edd9f97926f8c3a407ff3b25de1713e0966a664 /gst/camerabin2
parent42b510fd1b63ba8bb52eaf5817c39e2e2c8a2f1c (diff)
downloadgstreamer-plugins-bad-04e2a38ae3d8323a880a040fbcff5fd7e8ddda4c.tar.gz
wrappercamerabinsrc: fix deadlock with pad object lock
The image capture mutex and the pad object lock would cause a race if the pad query was made right when the image probe was running. The image probe needs the capture mutex and the querying would need the pad object lock.
Diffstat (limited to 'gst/camerabin2')
-rw-r--r--gst/camerabin2/gstwrappercamerabinsrc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst/camerabin2/gstwrappercamerabinsrc.c b/gst/camerabin2/gstwrappercamerabinsrc.c
index 892bac328..22e96ae49 100644
--- a/gst/camerabin2/gstwrappercamerabinsrc.c
+++ b/gst/camerabin2/gstwrappercamerabinsrc.c
@@ -838,6 +838,7 @@ start_image_capture (GstWrapperCameraBinSrc * self)
pad = gst_element_get_static_pad (self->src_vid_src, "src");
if (self->image_renegotiate) {
+ g_mutex_unlock (&bcamsrc->capturing_mutex);
peer = gst_pad_get_peer (pad);
gst_object_unref (pad);
gst_pad_query (peer, gst_query_new_drain ());
@@ -845,7 +846,6 @@ start_image_capture (GstWrapperCameraBinSrc * self)
self->image_renegotiate = FALSE;
- g_mutex_unlock (&bcamsrc->capturing_mutex);
gst_element_set_state (self->src_vid_src, GST_STATE_READY);
/* clean capsfilter caps so they don't interfere here */