videomixer: Unref allowed caps after usage
authorSebastian Rasmussen <sebras@hotmail.com>
Fri, 8 Aug 2014 10:36:01 +0000 (12:36 +0200)
committerThiago Santos <thiagoss@osg.samsung.com>
Fri, 8 Aug 2014 18:59:36 +0000 (15:59 -0300)
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734474

gst/videomixer/videomixer2.c

index 418005e..8adfa2b 100644 (file)
@@ -316,8 +316,11 @@ gst_videomixer2_update_converters (GstVideoMixer2 * mix)
 
   downstream_caps = gst_pad_get_allowed_caps (mix->srcpad);
 
-  if (!downstream_caps || gst_caps_is_empty (downstream_caps))
+  if (!downstream_caps || gst_caps_is_empty (downstream_caps)) {
+    if (downstream_caps)
+      gst_caps_unref (downstream_caps);
     return FALSE;
+  }
 
   formats_table = g_hash_table_new (g_direct_hash, g_direct_equal);