[FFmpeg-devel] [PATCH 0/1] avformat/mpegts: fix first NAL start code splited in two different packets

Nicolas Gaullier nicolas.gaullier at cji.paris
Tue Feb 6 12:58:25 EET 2024


>Envoyé : vendredi 2 février 2024 16:24
>À : ffmpeg-devel at ffmpeg.org
>Objet : [PATCH 0/1] avformat/mpegts: fix first NAL start code splited in two different packets
>
>This issue happens in the following case:
>- unaligned PES and NAL encoding
>- the first NAL of the access unit begins at the very end of a ts packet, sometimes only the 0x00 of the trailing byte (unfortunately, this is still conformant to the standards!)
>- the video frame is so small (ex: typically still picture) it fits in a ts packet and a new PES is immediately started
>
>Two sample files can be found here:
>a) https://0x0.st/HDwD.ts
>b) https://0x0.st/HDwd.ts
>
>For sample a, the first NAL (AUD) is splited this way:
>0x00 / 0x00 0x00 0x01 0x09
>And for sample b:
>0x00 0x00 0x00 / 0x01 0x09
>
>ffmpeg -i input.ts -f null /dev/null
>=> Application provided invalid, non monotonically increasing dts...
>
>
>Nicolas Gaullier (1):
>  avformat/mpegts: fix first NAL start code splited in two different
>    packets
>
> libavformat/mpegts.c | 41 +++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 39 insertions(+), 2 deletions(-)

Ping ?
If you think it would be better to have a related trac ticket, just tell me, I can do this of course.
Nicolas


More information about the ffmpeg-devel mailing list