From 8f2d34755996f1f8501b1ebbf0f29dc4747eb689 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 20 Apr 2022 14:50:35 +0200 Subject: [PATCH] hls: Relax webvtt checks If no hour field is present (which is allowed), the remaining data can be less than 15 character. Fix time translation failures if the hour field wasn't present Part-of: --- .../gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-util.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-util.c index 813d74ce7b..4e4a8c757b 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-util.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-util.c @@ -772,7 +772,7 @@ process_webvtt_cue_timing_setting_line (const gchar * input, return FALSE; /* --> */ - if (gst_byte_reader_get_remaining (&br) < 15 || + if (gst_byte_reader_get_remaining (&br) < 12 || g_ascii_strncasecmp ((const gchar *) gst_byte_reader_peek_data_unchecked (&br), "-->", 3)) return FALSE;