From: Marton Balint <cus@passwd.hu>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 1/2] mpegtsenc: Restrict "async" behavior to KLV async packets
Date: Thu, 16 Mar 2023 23:41:13 +0100 (CET)
Message-ID: <a0f2f042-67e-3bc0-f04c-1d2416ca5f96@passwd.hu> (raw)
In-Reply-To: <20230309170405.25457-1-dheitmueller@ltnglobal.com>
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 <dheitmueller@ltnglobal.com>
> ---
> 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".
prev parent reply other threads:[~2023-03-16 22:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 17:04 Devin Heitmueller
2023-03-09 17:04 ` [FFmpeg-devel] [PATCH 2/2] Add support for preserving SMPTE 2038 when transcoding MPEG-TS streams Devin Heitmueller
2023-03-16 22:40 ` Marton Balint
2023-03-16 22:41 ` Marton Balint [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a0f2f042-67e-3bc0-f04c-1d2416ca5f96@passwd.hu \
--to=cus@passwd.hu \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git