mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 21:16:24 +00:00
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/708>
This commit is contained in:
parent
8768efde64
commit
5726a66fdb
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue