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 D520540CAE for ; Sat, 9 Apr 2022 18:29:57 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A539D68B2F5; Sat, 9 Apr 2022 21:29:56 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5870868B2EE for ; Sat, 9 Apr 2022 21:29:53 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id EECF7E67CF for ; Sat, 9 Apr 2022 20:29:53 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FSbCaoF5pl6W for ; Sat, 9 Apr 2022 20:29:52 +0200 (CEST) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 4BC2DE50FF for ; Sat, 9 Apr 2022 20:29:52 +0200 (CEST) Date: Sat, 9 Apr 2022 20:29:52 +0200 (CEST) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <20220403102316.189763-1-aimingoff@pc.nifty.jp> Message-ID: <1ba143c3-a7be-4374-361-d4e2f5882ed8@passwd.hu> References: <20220403102316.189763-1-aimingoff@pc.nifty.jp> MIME-Version: 1.0 Subject: Re: [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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Sun, 3 Apr 2022, TADANO Tokumei wrote: > '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) Thanks, applied. Regards, Marton > > 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". > _______________________________________________ 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".