From b7e96ebe37a78ce26ec3ee96a2c2900a00477942 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 22 Feb 2012 17:00:19 +0000 Subject: [PATCH] flacenc: remove bogus pad locking that causes deadlocks It's not clear why the pad object lock is taken here. But gst_pad_{has,get}_current_caps() will try to take the lock as well and deadlock, since it's not recursive. --- ext/flac/gstflacenc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c index 8c94a57..cec2648 100644 --- a/ext/flac/gstflacenc.c +++ b/ext/flac/gstflacenc.c @@ -612,8 +612,6 @@ gst_flac_enc_getcaps (GstAudioEncoder * enc, GstCaps * filter) pad = GST_AUDIO_ENCODER_SINK_PAD (enc); - GST_OBJECT_LOCK (pad); - if (gst_pad_has_current_caps (pad)) { ret = gst_pad_get_current_caps (pad); } else { @@ -662,8 +660,6 @@ gst_flac_enc_getcaps (GstAudioEncoder * enc, GstCaps * filter) gst_structure_free (s); } - GST_OBJECT_UNLOCK (pad); - GST_DEBUG_OBJECT (pad, "Return caps %" GST_PTR_FORMAT, ret); caps = gst_audio_encoder_proxy_getcaps (enc, ret); -- 2.7.4