hls: Relax webvtt checks
authorEdward Hervey <edward@centricular.com>
Wed, 20 Apr 2022 12:50:35 +0000 (14:50 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 20 Apr 2022 17:47:00 +0000 (17:47 +0000)
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2248>

subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-util.c

index 813d74c..4e4a8c7 100644 (file)
@@ -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;