audioparsers: don't leak template caps
authorWim Taymans <wtaymans@redhat.com>
Wed, 4 Dec 2013 08:12:07 +0000 (09:12 +0100)
committerWim Taymans <wtaymans@redhat.com>
Wed, 4 Dec 2013 08:12:07 +0000 (09:12 +0100)
gst/audioparsers/gstaacparse.c
gst/audioparsers/gstac3parse.c
gst/audioparsers/gstdcaparse.c
gst/audioparsers/gstflacparse.c
gst/audioparsers/gstmpegaudioparse.c
gst/audioparsers/gstsbcparse.c
gst/audioparsers/gstwavpackparse.c

index cb22f6b..31bbc22 100644 (file)
@@ -1392,6 +1392,7 @@ gst_aac_parse_sink_getcaps (GstBaseParse * parse, GstCaps * filter)
 
     res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST);
     gst_caps_unref (peercaps);
+    gst_caps_unref (templ);
   } else {
     res = templ;
   }
index 5f32b11..7189740 100644 (file)
@@ -838,6 +838,7 @@ gst_ac3_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
 
     res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST);
     gst_caps_unref (peercaps);
+    gst_caps_unref (templ);
   } else {
     res = templ;
   }
index 76890a1..ef28612 100644 (file)
@@ -512,6 +512,7 @@ gst_dca_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
 
     res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST);
     gst_caps_unref (peercaps);
+    gst_caps_unref (templ);
   } else {
     res = templ;
   }
index 9ef50ee..6b48f5e 100644 (file)
@@ -1830,6 +1830,7 @@ gst_flac_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
 
     res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST);
     gst_caps_unref (peercaps);
+    gst_caps_unref (templ);
   } else {
     res = templ;
   }
index 87f1445..a205c95 100644 (file)
@@ -1435,6 +1435,7 @@ gst_mpeg_audio_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
 
     res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST);
     gst_caps_unref (peercaps);
+    gst_caps_unref (templ);
   } else {
     res = templ;
   }
index 1d65e5c..d14880a 100644 (file)
@@ -336,6 +336,7 @@ gst_sbc_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
 
     res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST);
     gst_caps_unref (peercaps);
+    gst_caps_unref (templ);
   } else {
     res = templ;
   }
index 44bae19..35af75d 100644 (file)
@@ -645,6 +645,7 @@ gst_wavpack_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
 
     res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST);
     gst_caps_unref (peercaps);
+    gst_caps_unref (templ);
   } else {
     res = templ;
   }