summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Bass <floobleflam@gmail.com>2020-08-25 14:54:31 +0100
committerTim-Philipp Müller <tim@centricular.com>2020-12-05 20:50:34 +0000
commit2e981f069031dfe25d2d865bb521445529dd2459 (patch)
treee5810405b982b1d713d03d5b2efb255059da8252
parentd1379c87a53df40b5cbb77098624f30991db7399 (diff)
downloadgstreamer-plugins-bad-2e981f069031dfe25d2d865bb521445529dd2459.tar.gz
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1859>
-rw-r--r--ext/ttml/ttmlparse.c2
1 files changed, 1 insertions, 1 deletions
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");