From d452ad0ecaba7add0ea68861f7a73ba7bc82d3cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 1 Dec 2016 19:57:47 +0200 Subject: [PATCH] ssaparse: Free initialization section before storing the next one If getting multiple caps events. https://bugzilla.gnome.org/show_bug.cgi?id=775480 --- gst/subparse/gstssaparse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c index 536ce0d521..9b00e7978a 100644 --- a/gst/subparse/gstssaparse.c +++ b/gst/subparse/gstssaparse.c @@ -195,6 +195,8 @@ gst_ssa_parse_setcaps (GstPad * sinkpad, GstCaps * caps) } /* FIXME: parse initial section */ + if (parse->ini) + g_free (parse->ini); parse->ini = g_strndup (ptr, left); GST_LOG_OBJECT (parse, "Init section:\n%s", parse->ini);