mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
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.
This commit is contained in:
parent
42b510fd1b
commit
04e2a38ae3
1 changed files with 1 additions and 1 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue