From 8df2314c23386ab7c395664c5ead9f0d8cd044e2 Mon Sep 17 00:00:00 2001 From: Chris Bass Date: Tue, 25 Aug 2020 14:54:31 +0100 Subject: [PATCH] ttmlparse: Ensure only single TTML doc parsed The parser handles only one TTML file at a time, therefore if there are multiple TTML documets in the input, parse only the first. Part-of: --- ext/ttml/ttmlparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ttml/ttmlparse.c b/ext/ttml/ttmlparse.c index 25895463af..4914910f7e 100644 --- a/ext/ttml/ttmlparse.c +++ b/ext/ttml/ttmlparse.c @@ -1952,7 +1952,7 @@ ttml_parse (const gchar * input, GstClockTime begin, GstClockTime duration, } GST_CAT_LOG (ttmlparse_debug, "Input:\n%s", input); - end_tt = g_strrstr (input, TTML_END_TAG); + end_tt = g_strstr_len (input, strlen (input), TTML_END_TAG); if (!end_tt) { GST_CAT_DEBUG (ttmlparse_debug, "Need more data");