* [FFmpeg-devel] [PATCH] avformat/mpegts: fix the issue where the PMT table can't be retrieved. (PR #21166)
@ 2025-12-11 6:40 ganqiuye via ffmpeg-devel
0 siblings, 0 replies; only message in thread
From: ganqiuye via ffmpeg-devel @ 2025-12-11 6:40 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: ganqiuye
PR #21166 opened by ganqiuye
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21166
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21166.patch
When analysing PAT, if sid 0 and pmt_pid 0 (current_pid 0 as pat_pid),
it will break out of the loop, so it can't retrieve the next pmt_pid.
Signed-off-by: ganqiuye <ganqiuye@gmail.com>
>From 6b03124bb57ef4afc118ff2123d15d54402b4302 Mon Sep 17 00:00:00 2001
From: ganqiuye <ganqiuye@gmail.com>
Date: Thu, 11 Dec 2025 14:32:01 +0800
Subject: [PATCH] avformat/mpegts: fix the issue where the PMT table can't be
retrieved.
When analysing PAT, if sid 0 and pmt_pid 0 (current_pid 0 as pat_pid),
it will break out of the loop, so it can't retrieve the next 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.49.1
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-12-11 6:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-11 6:40 [FFmpeg-devel] [PATCH] avformat/mpegts: fix the issue where the PMT table can't be retrieved. (PR #21166) ganqiuye via ffmpeg-devel
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