From 5726a66fdba0d41afddd3d676cc1127c25105668 Mon Sep 17 00:00:00 2001 From: Hosang Lee Date: Wed, 17 Jun 2020 09:03:51 +0900 Subject: [PATCH] subparse: lower text buffer threshold It is possible for subtitle files to have a string length less than 30. WebVTT for example may contain only the 'WEBVTT' string in the file without any cues. As an example in hls streams, since WEBVTT files can be segmented like video/audio, some subtitle segments may only contain just the header string. Part-of: --- gst/subparse/gstsubparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c index 1ab53e7..382e430 100644 --- a/gst/subparse/gstsubparse.c +++ b/gst/subparse/gstsubparse.c @@ -1601,7 +1601,7 @@ gst_sub_parse_format_autodetect (GstSubParse * self) gchar *data; GstSubParseFormat format; - if (strlen (self->textbuf->str) < 30) { + if (strlen (self->textbuf->str) < 6) { GST_DEBUG ("File too small to be a subtitles file"); return NULL; } -- 2.7.4