Message ID | AS8P250MB07445E151B52B641B0DCD3E88F5E2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] avformat/mpegts: Restrict skipping Metadata AU cells to metadata streams | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On Fri, 1 Mar 2024, Andreas Rheinhardt wrote: > 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. I sent a patch for this yesterday: https://ffmpeg.org/pipermail/ffmpeg-devel/2024-March/322432.html Regards, Marton
Marton Balint: > > > On Fri, 1 Mar 2024, Andreas Rheinhardt wrote: > >> 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. > > I sent a patch for this yesterday: > > https://ffmpeg.org/pipermail/ffmpeg-devel/2024-March/322432.html > Sorry. (Your commit message should mention that this is a regression caused by 468615f2045da325e0f73e8e668d49cf456ccb37.) - Andreas
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;
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.rheinhardt@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(-)