[FFmpeg-devel] [PATCH] avcodec/h264_mp4toannexb: Prepend SPS/PPS to buffering period SEI

Timo Rothenpieler timo at rothenpieler.org
Tue Jul 23 03:16:46 EEST 2024


On 23/07/2024 01:01, Josh Allmann wrote:
> On Tue, 9 Jul 2024 at 12:06, Josh Allmann <joshua.allmann at gmail.com> wrote:
>>
>> Encoders may emit a buffering period SEI without a corresponding
>> SPS/PPS if the SPS/PPS is carried out-of-band, eg with avcc.
>>
>> During Annex B conversion, this may result in the SPS/PPS being
>> inserted *after* the buffering period SEI but before the IDR NAL.
>>
>> Since the buffering period SEI references the SPS, the SPS/PPS
>> needs to come first.
>> ---
>>
>> Notes:
>>      v2: Updated FATE test refs
>>
>>   libavcodec/bsf/h264_mp4toannexb.c          | 13 +++++++++++++
>>   tests/ref/fate/h264-bsf-mp4toannexb        |  2 +-
>>   tests/ref/fate/h264_mp4toannexb_ticket2991 | 18 +++++++++---------
>>   tests/ref/fate/segment-mp4-to-ts           | 12 ++++++------
>>   4 files changed, 29 insertions(+), 16 deletions(-)
>>
> 
> Ping again for review. Looking at the FATE output, this patch fixes a number
> of things - see [1] for details

patch generally looks good to me, but I'm not closely familiar with the 
code there.


More information about the ffmpeg-devel mailing list