From 87c448de94536b325bddde017cff63d1c37c1bae Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Fri, 29 Nov 2024 11:57:36 +0100 Subject: [PATCH] packetizer/av1: fill the full extradata if it doesn't have the optional OBU The optional part needed by the decoders. This will restart the decoders if needed, but they should have received no frames yet or the hardware decoder may be usable again or not (after a sequence header change). (cherry picked from commit a95213e20de69d584324f6d0c9f37c7a7cdfe3e3) (edited) edited: - fmt_in was not a pointer in 3.0 Gbp-Pq: Name 0108-packetizer-av1-fill-the-full-extradata-if-it-doesn-t.patch --- modules/packetizer/av1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/packetizer/av1.c b/modules/packetizer/av1.c index dc970dca..964c0f79 100644 --- a/modules/packetizer/av1.c +++ b/modules/packetizer/av1.c @@ -158,8 +158,9 @@ static void UpdateDecoderFormat(decoder_t *p_dec) p_dec->fmt_out.i_extra = 0; } - if(!p_dec->fmt_in.i_extra && !p_dec->fmt_out.i_extra) + if(p_dec->fmt_out.i_extra <= 4) { + free(p_dec->fmt_out.p_extra); p_dec->fmt_out.i_extra = AV1_create_DecoderConfigurationRecord((uint8_t **)&p_dec->fmt_out.p_extra, p_sys->p_sequence_header, -- 2.30.2