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 <[email protected]> --- 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 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
