From patchwork Tue Sep 7 15:38:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Hohe X-Patchwork-Id: 30063 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp4789782iov; Tue, 7 Sep 2021 08:38:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVlPkFq1BGpsZZwKZD7lCH+K44CXVUIrqfHv3hFG0oQR8srPOI+/AXLGbSGcJp3TWSPkIS X-Received: by 2002:a17:906:1c8c:: with SMTP id g12mr19068656ejh.186.1631029138505; Tue, 07 Sep 2021 08:38:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631029138; cv=none; d=google.com; s=arc-20160816; b=i6skQoZPx217+CSrwzvNdEnHrjHbZlQ1ItxZ0c3VoSmOfxTDaCNkFa8DLrJhyImdwI 1Y3r7CLvOriPXRC46y+KZCrgu+VRk6M15Eg94xxk1AuJAaJomKKX+p0351zbuFK43SGX 2SvlcTi7of25b5D62JgWg/zRBvTxwhPVdtcp1iofBQ0mdJOUBXkIPZezmfFyp6CZTk6w 7KTd64lv7dsFs6uEZhiQPq0jTRADlu+5sNvxwUUY4qkdURNAyWQMC2bfvD6WJwXfadp3 197oO9OT8lCuHABHyycvHPZU4eZpMDLikep+q+qyhYmBqlZeRT5yd9u8EsMkcaYfbB+f emQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=sWPbXEa40sWFLnRPVp+t3W5a6rLrAQSdoDkW//z1048=; b=dJCGeRrVc8aUl/HlSU+De/TJIT/cKcOFY1OMUpBMCSS4IelgYzy1a1FWe3Rp4iM/0T xTVxbjeXP7F1UGZ3QQc1yZy7GCvr+FTIXO7J8q5iCDGW3vE71wVaGRCjEP9w8RX0cwl0 1VXYOgdoAKMXdXt0F8zGAjkt/8oawtu2JbbW4SDm+4bt19z6mtBriSY5M6emUSEvIeOy nmZZQcbHprAxkWEJIOoTy1uLNQ2T4SJycSMeAj6jkZTJ8LfAiNK5IJpdimgyENF1NVs/ dVc+A49dk+9NXY0GyYaJP6kzko9toXe5J7YaWeRx9r1mdwebXymeQRChvADXzSScfymG mTMA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id r19si11043246edd.599.2021.09.07.08.38.57; Tue, 07 Sep 2021 08:38:58 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 124D668A16C; Tue, 7 Sep 2021 18:38:55 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.tejp.de (fire.tejp.de [94.199.213.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9F4FF68A16C for ; Tue, 7 Sep 2021 18:38:48 +0300 (EEST) X-Original-To: X-Original-To: Received: from burrito.tejp.de (033-141-067-156.ip-addr.inexio.net [156.67.141.33]) by mail.tejp.de (Postfix) with ESMTPSA id 4EE7552028E; Tue, 7 Sep 2021 17:38:48 +0200 (CEST) Received: from sth by burrito.tejp.de with local (Exim 4.94) (envelope-from ) id 1mNdBP-000Ur4-Mv; Tue, 07 Sep 2021 17:38:47 +0200 From: Stephan Hohe To: ffmpeg-devel@ffmpeg.org Date: Tue, 7 Sep 2021 17:38:40 +0200 Message-Id: <20210907153840.118561-1-sth.dev@tejp.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=5.1 required=13.0 tests=ALL_TRUSTED, BAYES_00, TEJP_DEV, TEJP_ORIG_FOUND autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 TEJP_ORIG_FOUND Has a X-Original-To header * 8.0 TEJP_DEV Addressed to sth.dev@tejp.de X-Spam-Level: ***** X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on fire.tejp.de Subject: [FFmpeg-devel] [PATCH] avformat/webvttdec: skip STYLE blocks X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Stephan Hohe Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: cMYdW2VBA/Bp 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;