deinterlace: Don't pointlessly hold object lock over caps operations
authorJan Schmidt <thaytan@noraisin.net>
Thu, 27 Oct 2011 13:41:45 +0000 (00:41 +1100)
committerJan Schmidt <thaytan@noraisin.net>
Thu, 27 Oct 2011 13:41:45 +0000 (00:41 +1100)
Avoids a deadlock when getcaps is recursive due to the getcaps being
reflected upstream/downstream. The lock isn't actually protecting
anything here.

gst/deinterlace/gstdeinterlace.c

index 8e505a8..e1210d1 100644 (file)
@@ -2091,8 +2091,6 @@ gst_deinterlace_getcaps (GstPad * pad)
   const GstCaps *ourcaps;
   GstCaps *peercaps;
 
-  GST_OBJECT_LOCK (self);
-
   otherpad = (pad == self->srcpad) ? self->sinkpad : self->srcpad;
 
   ourcaps = gst_pad_get_pad_template_caps (pad);
@@ -2106,8 +2104,6 @@ gst_deinterlace_getcaps (GstPad * pad)
     ret = gst_caps_copy (ourcaps);
   }
 
-  GST_OBJECT_UNLOCK (self);
-
   for (len = gst_caps_get_size (ret); len > 0; len--) {
     GstStructure *s = gst_caps_get_structure (ret, len - 1);