From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 23DE94088E for ; Sun, 3 Apr 2022 10:24:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BACDF68B1AC; Sun, 3 Apr 2022 13:24:01 +0300 (EEST) Received: from conssluserg-02.nifty.com (conssluserg-02.nifty.com [210.131.2.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A4C8768005B for ; Sun, 3 Apr 2022 13:23:54 +0300 (EEST) Received: from osamu-pc.kimura.local (M106073025034.v4.enabler.ne.jp [106.73.25.34]) (authenticated) by conssluserg-02.nifty.com with ESMTP id 233ANOIb016526; Sun, 3 Apr 2022 19:23:28 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com 233ANOIb016526 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1648981408; bh=PeFAEA6Bn+7YWlLcJ/E+dKrK3JuGfe70dTHnJcwTaAo=; h=From:To:Cc:Subject:Date:From; b=EeFR+IK8Rf42UOieiOZzaj1/FKacumBJZpX/T8XxQWJFH0Y/R+MTSKUUebkAYaXYr G3p2YPVMvzAIb4lL1eQIE3kgfPuAQgtx+itE2FTdRnc12EOJeR+MmSRDPJm/mnrp0o zMZPKnu8gRNDQ8TS11a7BgcViNHL8ftt1SCr3R3N8JH+tL04RhWla3SvBH4IENo38F 65jAuFqikDu4Qgokyef1zirGpNmE/Maijh4SiVKgPy9ES1FTwnSXYA/Mj7HeZZUXjH 8Vufl1n0RipgjZdxQN/ian18UY86WAPlHbU3JQof2AiQtnDeo/qGXKvrLsFGu+tNk9 8Xooad3Z3l3/A== X-Nifty-SrcIP: [106.73.25.34] From: TADANO Tokumei To: ffmpeg-devel@ffmpeg.org Date: Sun, 3 Apr 2022 19:23:16 +0900 Message-Id: <20220403102316.189763-1-aimingoff@pc.nifty.jp> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] libavformat/mpegts.c: ignore a section with next flag 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: TADANO Tokumei Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 'current_next_indicator' of 0 (next) on each section header indicates the service information is for immediate future one. ffmpeg doesn't need to parse it but current (1) one. ref: section 5.1.1 of DVB BlueBook A038 (EN 300 468) Signed-off-by: TADANO Tokumei --- libavformat/mpegts.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index ecffb01562..49f7735123 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -645,6 +645,7 @@ typedef struct SectionHeader { uint8_t tid; uint16_t id; uint8_t version; + uint8_t current_next; uint8_t sec_num; uint8_t last_sec_num; } SectionHeader; @@ -773,6 +774,7 @@ static int parse_section_header(SectionHeader *h, if (val < 0) return val; h->version = (val >> 1) & 0x1f; + h->current_next = val & 0x01; val = get8(pp, p_end); if (val < 0) return val; @@ -2332,6 +2334,8 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len return; if (h->tid != PMT_TID) return; + if (!h->current_next) + return; if (skip_identical(h, tssf)) return; @@ -2541,6 +2545,8 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len return; if (h->tid != PAT_TID) return; + if (!h->current_next) + return; if (ts->skip_changes) return; @@ -2679,6 +2685,8 @@ static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len return; if (h->tid != SDT_TID) return; + if (!h->current_next) + return; if (ts->skip_changes) return; if (skip_identical(h, tssf)) -- 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-request@ffmpeg.org with subject "unsubscribe".