decodebin2: Fix memory leak
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 6 Sep 2011 11:06:26 +0000 (13:06 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 6 Sep 2011 11:16:44 +0000 (13:16 +0200)
gst/playback/gstdecodebin2.c

index a814dac44095fe8bd8968f3ec77eb707f02d1738..cf9541c8a5a3ff261166630f23f0105796694644 100644 (file)
@@ -1461,6 +1461,7 @@ analyze_new_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad,
 
       /* If the caps are raw, this just means we don't want to expose them */
       if (gst_caps_can_intersect (raw, caps)) {
+        g_value_array_free (factories);
         gst_caps_unref (raw);
         gst_object_unref (dpad);
         goto discarded_type;
@@ -1533,6 +1534,7 @@ analyze_new_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad,
 
     if (dontuse) {
       gst_object_unref (dpad);
+      g_value_array_free (factories);
       goto discarded_type;
     }
   }