From 2e981f069031dfe25d2d865bb521445529dd2459 Mon Sep 17 00:00:00 2001 From: Chris Bass Date: Tue, 25 Aug 2020 14:54:31 +0100 Subject: 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 25895463a..4914910f7 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"); -- cgit v1.2.1