diff mbox series

[FFmpeg-devel] avformat/webvttdec: skip STYLE blocks

Message ID 20210907153840.118561-1-sth.dev@tejp.de
State New
Headers show
Series [FFmpeg-devel] avformat/webvttdec: skip STYLE blocks | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Stephan Hohe Sept. 7, 2021, 3:38 p.m. UTC
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 mbox series

Patch

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;