From: Vincent Penquerc'h Date: Fri, 12 May 2017 09:00:56 +0000 (+0100) Subject: h265parse: fix caps leak in renegotiation X-Git-Tag: 1.12.2~62 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0494591f852b176fd6f5c76437cdc55b956308bb;p=platform%2Fupstream%2Fgst-plugins-bad.git h265parse: fix caps leak in renegotiation --- diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c index f965a4b..36cd8ec 100644 --- a/gst/videoparsers/gsth265parse.c +++ b/gst/videoparsers/gsth265parse.c @@ -341,7 +341,6 @@ gst_h265_parse_negotiate (GstH265Parse * h265parse, gint in_format, /* fixate to avoid ambiguity with lists when parsing */ caps = gst_caps_fixate (caps); gst_h265_parse_format_from_caps (caps, &format, &align); - gst_caps_unref (caps); } /* default */ @@ -358,6 +357,9 @@ gst_h265_parse_negotiate (GstH265Parse * h265parse, gint in_format, h265parse->align = align; h265parse->transform = (in_format != h265parse->format); + + if (caps) + gst_caps_unref (caps); } static GstBuffer *