Parsing STYLE blocks as normal subtitle data doesn't work, so
instead skip those blocks completely.

Fixes #9064
---
 libavformat/webvttdec.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/webvttdec.c b/libavformat/webvttdec.c
index 52320ba7d1..40763b082d 100644
--- a/libavformat/webvttdec.c
+++ b/libavformat/webvttdec.c
@@ -114,6 +114,11 @@ static int webvtt_read_header(AVFormatContext *s)
                 p++;
         }
 
+        /* skip STYLE blocks */
+        if (identifier_len == 5 && !strncmp(identifier, "STYLE", 5)) {
+            continue;
+        }
+
         /* cue timestamps */
         if ((ts_start = read_ts(p)) == AV_NOPTS_VALUE)
             break;
-- 
2.30.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to