Only metadata streams (stream type 0x15) are packed in Metadata AU cells, so it should only be stripped from them and not from all KLV streams.
Fixes ticket #10828, a regression since 468615f2045da325e0f73e8e668d49cf456ccb37. Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> --- I really don't know mpegts; the above information is based around reading ITU-T H.222.0 for about half an hour. libavformat/mpegts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 836d5dd5a3..7c40e52262 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1307,7 +1307,8 @@ skip: p += sl_header_bytes; buf_size -= sl_header_bytes; } - if (pes->st->codecpar->codec_id == AV_CODEC_ID_SMPTE_KLV && buf_size >= 5) { + if (pes->st->codecpar->codec_id == AV_CODEC_ID_SMPTE_KLV && + pes->stream_type == 0x15 && buf_size >= 5) { /* skip metadata access unit header */ pes->pes_header_size += 5; p += 5; -- 2.40.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".