deinterlace: fix caps leak
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 17 May 2016 10:40:38 +0000 (13:40 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Fri, 20 May 2016 06:36:09 +0000 (09:36 +0300)
The caps returned by gst_pad_get_current_caps() was never unreffed when
not early returning.

Fix a leak with the elements/deinterlace test.

https://bugzilla.gnome.org/show_bug.cgi?id=766558

gst/deinterlace/gstdeinterlace.c

index 65e9c71..cd9b1e1 100644 (file)
@@ -2532,6 +2532,7 @@ gst_deinterlace_setcaps (GstDeinterlace * self, GstPad * pad, GstCaps * caps)
       return TRUE;
     }
     gst_deinterlace_reset_history (self, FALSE);
+    gst_caps_unref (current_caps);
   }
   peercaps = gst_pad_peer_query_caps (self->srcpad, NULL);