flacenc: remove bogus pad locking that causes deadlocks
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 22 Feb 2012 17:00:19 +0000 (17:00 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 22 Feb 2012 17:00:19 +0000 (17:00 +0000)
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

index 8c94a57..cec2648 100644 (file)
@@ -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);