interlace: fix caps refcounting
authorSebastian Rasmussen <sebras@hotmail.com>
Sat, 9 Aug 2014 11:12:14 +0000 (13:12 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Sun, 10 Aug 2014 11:04:38 +0000 (12:04 +0100)
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 c503abf..6cd369b 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);