From 0d55724a2bc0be00dc154b438fafce6a28de8747 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 4 Dec 2013 09:12:07 +0100 Subject: [PATCH] audioparsers: don't leak template caps --- gst/audioparsers/gstaacparse.c | 1 + gst/audioparsers/gstac3parse.c | 1 + gst/audioparsers/gstdcaparse.c | 1 + gst/audioparsers/gstflacparse.c | 1 + gst/audioparsers/gstmpegaudioparse.c | 1 + gst/audioparsers/gstsbcparse.c | 1 + gst/audioparsers/gstwavpackparse.c | 1 + 7 files changed, 7 insertions(+) diff --git a/gst/audioparsers/gstaacparse.c b/gst/audioparsers/gstaacparse.c index cb22f6b..31bbc22 100644 --- a/gst/audioparsers/gstaacparse.c +++ b/gst/audioparsers/gstaacparse.c @@ -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; } diff --git a/gst/audioparsers/gstac3parse.c b/gst/audioparsers/gstac3parse.c index 5f32b11..7189740 100644 --- a/gst/audioparsers/gstac3parse.c +++ b/gst/audioparsers/gstac3parse.c @@ -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; } diff --git a/gst/audioparsers/gstdcaparse.c b/gst/audioparsers/gstdcaparse.c index 76890a1..ef28612 100644 --- a/gst/audioparsers/gstdcaparse.c +++ b/gst/audioparsers/gstdcaparse.c @@ -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; } diff --git a/gst/audioparsers/gstflacparse.c b/gst/audioparsers/gstflacparse.c index 9ef50ee..6b48f5e 100644 --- a/gst/audioparsers/gstflacparse.c +++ b/gst/audioparsers/gstflacparse.c @@ -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; } diff --git a/gst/audioparsers/gstmpegaudioparse.c b/gst/audioparsers/gstmpegaudioparse.c index 87f1445..a205c95 100644 --- a/gst/audioparsers/gstmpegaudioparse.c +++ b/gst/audioparsers/gstmpegaudioparse.c @@ -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; } diff --git a/gst/audioparsers/gstsbcparse.c b/gst/audioparsers/gstsbcparse.c index 1d65e5c..d14880a 100644 --- a/gst/audioparsers/gstsbcparse.c +++ b/gst/audioparsers/gstsbcparse.c @@ -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; } diff --git a/gst/audioparsers/gstwavpackparse.c b/gst/audioparsers/gstwavpackparse.c index 44bae19..35af75d 100644 --- a/gst/audioparsers/gstwavpackparse.c +++ b/gst/audioparsers/gstwavpackparse.c @@ -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; } -- 2.7.4