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 cb22f6bed33d158692c3450d18d299704f4888bf..31bbc22ebfefffa203986ca47b933986b70744db 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 5f32b113fb21e5f8bf504e0cddb5ff2086e82155..71897407671a3e6397ea3fc416d972f09b1de8f4 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 76890a105e9a2f618b5f2b9aa2a5eaef39d8fbe0..ef28612c6480bb52f4cdc04bbcf11e37340e3b42 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 9ef50ee38f77a8733f17650542f7075e08ac24e4..6b48f5e2fa03ddf93f1fdb25e4c82302feec180f 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 87f144580b75b40236717781bd688aa851e5b347..a205c959fe305502eb8a190d9a388b0b2d68df90 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 1d65e5c92d02339ae22f1e35aff4005b27d1658d..d14880a59c2cc0c4e17c063827aa2fa7358ff600 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 44bae1969997b18b258975063afed743bf0cc9ff..35af75db822b64a67815937d525ee0332113555c 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;
   }