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 82F1E45B06 for ; Thu, 16 Mar 2023 22:41:16 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DC85068C121; Fri, 17 Mar 2023 00:41:14 +0200 (EET) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CE54868C11A for ; Fri, 17 Mar 2023 00:41:08 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 73BF4E7AF5 for ; Thu, 16 Mar 2023 23:41:16 +0100 (CET) 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 VpfZeKiwHkGo for ; Thu, 16 Mar 2023 23:41:13 +0100 (CET) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 98A39E6FD3 for ; Thu, 16 Mar 2023 23:41:13 +0100 (CET) Date: Thu, 16 Mar 2023 23:41:13 +0100 (CET) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <20230309170405.25457-1-dheitmueller@ltnglobal.com> Message-ID: References: <20230309170405.25457-1-dheitmueller@ltnglobal.com> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 1/2] mpegtsenc: Restrict "async" behavior to KLV async packets 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 Thu, 9 Mar 2023, Devin Heitmueller wrote: > The original code would strip off the PTS/DTS of any packets > which had a stream ID of STREAM_ID_PRIVATE_STREAM_1. While the > intent was to apply this to asynchronous KLV packets, it was > being applied to any codec that had that same stream ID (including > types such as SMPTE 2038). > > Add a clause to the if() statement to ensure it only gets applied > if the codec actually is KLV. Thanks, will apply. Regards, Marton > > Signed-off-by: Devin Heitmueller > --- > libavformat/mpegtsenc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c > index ceed089587..3f201cce1d 100644 > --- a/libavformat/mpegtsenc.c > +++ b/libavformat/mpegtsenc.c > @@ -1455,7 +1455,8 @@ static int get_pes_stream_id(AVFormatContext *s, AVStream *st, int stream_id, in > st->codecpar->codec_id == AV_CODEC_ID_TIMED_ID3) { > return STREAM_ID_PRIVATE_STREAM_1; > } else if (st->codecpar->codec_type == AVMEDIA_TYPE_DATA) { > - if (stream_id == STREAM_ID_PRIVATE_STREAM_1) /* asynchronous KLV */ > + if (st->codecpar->codec_id == AV_CODEC_ID_SMPTE_KLV && > + stream_id == STREAM_ID_PRIVATE_STREAM_1) /* asynchronous KLV */ > *async = 1; > return stream_id != -1 ? stream_id : STREAM_ID_METADATA_STREAM; > } else { > -- > 2.35.1.655.ga68dfadae5 > > _______________________________________________ > 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".