[FFmpeg-devel] [PATCH] libavformat/mpegtsenc.c -- correctly re-emit extradata ahead of IDR pictures
John Coiner
jpcoiner at gmail.com
Thu Feb 2 19:43:39 EET 2023
On Mon, Jan 30, 2023 at 4:12 PM Marton Balint <cus at passwd.hu> wrote:
>
> For normal mpegts it also makes sense to include SPS/PPS before IDR-s, so
> I'd say it is better if it is fixed in mpegtsenc.
>
> But it is mandatory to insert AUD NAL-s for every frame, and your patch
> breaks that, because it only inserts it if SPS/PPS is also inserted,
> because you changed
>
> if ((state & 0x1f) != 9) { // AUD NAL
>
> to
>
> if (extradd > 0) {
>
> So you need to rework your patch to keep the AUD insertion (but you don't
> want to duplicate it of course).
>
> Regards,
> Marton
>
Marton, thank you for this explanation. I understand now. There's an
updated patch that preserves AUD insertion at
http://ffmpeg.org/pipermail/ffmpeg-devel/2023-January/306143.html
Posting to bump the visibility of that one, which perhaps should have
been tagged "v2", whoops. Should I repost with "v2" to start a new
thread?
Cheers,
John
More information about the ffmpeg-devel
mailing list