From: Kieran Kunhya via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Kieran Kunhya <kieran618@googlemail.com>
Subject: [FFmpeg-devel] Re: [PATCH] libavformat/mpegts: fix network pid is 0 in pat_cb
Date: Thu, 27 Nov 2025 13:16:36 +0000
Message-ID: <CABGuwEkL-P5pOrb57Rctw1jFNNzwCe_PfajgA+udMrVy0DJ4Ow@mail.gmail.com> (raw)
In-Reply-To: <20251127105233.473-1-ganqiuye@gmail.com>
On Thu, 27 Nov 2025, 10:53 ganqiuye via ffmpeg-devel, <
ffmpeg-devel@ffmpeg.org> wrote:
> When analysing PAT, if network PID is 0, it won't get the PMT PID.
>
> Signed-off-by: ganqiuye <ganqiuye@gmail.com>
> ---
> libavformat/mpegts.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
> index 33f2914104..f6d860007f 100644
> --- a/libavformat/mpegts.c
> +++ b/libavformat/mpegts.c
> @@ -2590,14 +2590,13 @@ static void pat_cb(MpegTSFilter *filter, const
> uint8_t *section, int section_len
> break;
> pmt_pid &= 0x1fff;
>
> - if (pmt_pid == ts->current_pid)
> - break;
> -
> av_log(ts->stream, AV_LOG_TRACE, "sid=0x%x pid=0x%x\n", sid,
> pmt_pid);
>
> if (sid == 0x0000) {
> /* NIT info */
> } else {
> + if (pmt_pid == ts->current_pid)
> + break;
> MpegTSFilter *fil = ts->pids[pmt_pid];
> struct Program *prg;
> program = av_new_program(ts->stream, sid);
> --
> 2.45.1.windows.1
>
Needs some comment to explain why as PID 0 is for PAT.
Kieran
>
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
next prev parent reply other threads:[~2025-11-27 13:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 10:52 [FFmpeg-devel] " ganqiuye via ffmpeg-devel
2025-11-27 13:16 ` Kieran Kunhya via ffmpeg-devel [this message]
2025-11-28 5:21 ` [FFmpeg-devel] [PATCH v2] avformat/mpegts: fix the issue where the PMT table can't be retrieved ganqiuye via ffmpeg-devel
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=CABGuwEkL-P5pOrb57Rctw1jFNNzwCe_PfajgA+udMrVy0DJ4Ow@mail.gmail.com \
--to=ffmpeg-devel@ffmpeg.org \
--cc=kieran618@googlemail.com \
/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