From 5e8b4bf085180f7a4c7ae6ec0f525baeaedd4df8 Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Thu, 2 Oct 2014 03:30:24 +0200 Subject: [PATCH] baseparse: don't leak caps in gst_base_parse_process_streamheader https://bugzilla.gnome.org/show_bug.cgi?id=737762 --- libs/gst/base/gstbaseparse.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index 8fd1103..7f29afa 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -2756,10 +2756,16 @@ gst_base_parse_process_streamheader (GstBaseParse * parse) GST_OBJECT_CAST (parse), gst_buffer_ref (buffer)); } + gst_caps_unref (caps); + return ret; notfound: { + if (caps) { + gst_caps_unref (caps); + } + GST_DEBUG_OBJECT (parse, "No streamheader on caps"); return GST_FLOW_OK; } -- 2.7.4