interlace: fix caps refcounting
authorSebastian Rasmussen <sebras@hotmail.com>
Sat, 9 Aug 2014 11:12:14 +0000 (13:12 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 11 Aug 2014 06:49:18 +0000 (08:49 +0200)
tcaps was unrefed when it shouldn't have been unrefed
in some cases.

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

gst/interlace/gstinterlace.c

index c503abf15ff91792cfedc0b2357174823c16d5cb..6cd369bf55ad345a91075d2be4b47f4cd297390c 100644 (file)
@@ -523,6 +523,7 @@ gst_interlace_getcaps (GstPad * pad, GstInterlace * interlace, GstCaps * filter)
   if (othercaps) {
     icaps = gst_caps_intersect (othercaps, tcaps);
     gst_caps_unref (othercaps);
+    gst_caps_unref (tcaps);
   } else {
     icaps = tcaps;
   }
@@ -542,8 +543,6 @@ gst_interlace_getcaps (GstPad * pad, GstInterlace * interlace, GstCaps * filter)
   gst_caps_set_simple (icaps, "interlace-mode", G_TYPE_STRING,
       pad == interlace->srcpad ? mode : "progressive", NULL);
 
-  gst_caps_unref (tcaps);
-
   if (clean_filter)
     gst_caps_unref (clean_filter);