packetizer/av1: fill the full extradata if it doesn't have the optional OBU
authorSteve Lhomme <robux4@ycbcr.xyz>
Fri, 29 Nov 2024 10:57:36 +0000 (11:57 +0100)
committerSebastian Ramacher <sramacher@debian.org>
Tue, 21 Jan 2025 18:02:47 +0000 (19:02 +0100)
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

index dc970dca5a4b36d5f45f4dbddaf881aa5b750969..964c0f79bea788d29d7c34d3a37d87a859bab624 100644 (file)
@@ -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,