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/1539>
This commit is contained in:
Chris Bass 2020-08-25 14:54:31 +01:00 committed by GStreamer Merge Bot
parent dd7b672830
commit 8df2314c23

View file

@ -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");