From: Hosang Lee Date: Wed, 17 Jun 2020 00:03:51 +0000 (+0900) Subject: subparse: lower text buffer threshold X-Git-Tag: accepted/tizen/unified/20210719.025235^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d917c1f162c699d80599177b5569758803d65c5;p=platform%2Fupstream%2Fgst-plugins-base.git 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. Change-Id: I42dd0497852550d7cd6dd21a485856f06af55d71 Part-of: --- diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c index a046840..12bfed8 100644 --- a/gst/subparse/gstsubparse.c +++ b/gst/subparse/gstsubparse.c @@ -1755,7 +1755,11 @@ gst_sub_parse_format_autodetect (GstSubParse * self) gchar *data; GstSubParseFormat format; +#ifdef TIZEN_FEATURE_UPSTREAM + if (strlen (self->textbuf->str) < 6) { +#else if (strlen (self->textbuf->str) < 30) { +#endif GST_DEBUG ("File too small to be a subtitles file"); return NULL; }