[FFmpeg-devel] [PATCH] avformat/mpegts: update stream info when PMT ES stream_type changes
Pavel Koshevoy
pkoshevoy at gmail.com
Sat Apr 19 19:18:29 EEST 2025
I have a couple of .ts captures where video and audio codec changes
even though the PMT version does not change and the PIDs stay the same.
---
libavformat/mpegts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 54594b3a11..8a72d6988a 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -2508,7 +2508,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if (!st)
goto out;
- if (pes && !pes->stream_type)
+ if (pes && pes->stream_type != stream_type)
mpegts_set_stream_info(st, pes, stream_type, prog_reg_desc);
add_pid_to_program(prg, pid);
--
2.43.0
More information about the ffmpeg-devel
mailing list