Opened 9 months ago

Closed 9 months ago

#10883 closed defect (fixed)

first 5 bytes of all MPEGTS KLV data is dropped

Reported by: tmc2001 Owned by:
Priority: important Component: avformat
Version: 6.1 Keywords: regression mpegts klv
Cc: Marton Balint Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by tmc2001)

This is a regression from 6.0 to 6.1, introduced by changeset:
https://github.com/FFmpeg/FFmpeg/commit/468615f2045da325e0f73e8e668d49cf456ccb37

This change causes the first 5 bytes of all MPEGTS KLV data to be dropped, which is incorrect.

I am not sure on the history of why the 5 byte skip is needed, but, if that skip is needed, might I at least recommend to change it to:

if (pes->stream_type == 0x15 && pes->st->codecpar->codec_id == AV_CODEC_ID_SMPTE_KLV && buf_size >= 5)

Thank you.

Change History (4)

comment:1 by tmc2001, 9 months ago

Description: modified (diff)
Summary: first 5 bytes of all KLV data is droppedfirst 5 bytes of all MPEGTS KLV data is dropped

comment:2 by Balling, 9 months ago

hi. I suppose you do not understand that when there is [1] in the commit message that means that there was supposed to be a cite. But there was not. So look up the source patch:
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20230620050932.85936-1-toots@rastageeks.org/

and it has all the info about stuff

To test:

  1. download this file: https://www.dropbox.com/s/jy8sih3pe8qskxb/bla.ts?dl=1

This file was download from: http://playertest.longtailvideo.com/adaptive/wowzaid3/playlist.m3u8

  1. run this command: ffprobe -show_streams -select_streams 0 -show_packets -show_private_data \

-show_data /path/to/bla.ts

Before:
[PACKET]
codec_type=data
stream_index=0
pts=494646418
pts_time=5496.071311
dts=494646418
dts_time=5496.071311
duration=N/A
duration_time=N/A
size=21
pos=482784
flags=K__
data=
00000000: 0000 0000 1054 4954 3200 0000 0600 0003  .....TIT2.......
00000010: 7465 7374 00                             test.

After:
[PACKET]
codec_type=data
stream_index=0
pts=494646418
pts_time=5496.071311
dts=494646418
dts_time=5496.071311
duration=N/A
duration_time=N/A
size=26
pos=482784
flags=K__
data=
00000000: 4944 3304 0000 0000 0010 5449 5432 0000  ID3.......TIT2..
00000010: 0006 0000 0374 6573 7400                 .....test.

comment:3 by Marton Balint, 9 months ago

Cc: Marton Balint added
Keywords: regression mpegts klv added
Priority: normalimportant
Status: newopen

comment:4 by Marton Balint, 9 months ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.