demux/mp4: force the packetizer to fill AV1 extradata without optional OBUs
authorSteve Lhomme <robux4@ycbcr.xyz>
Fri, 29 Nov 2024 10:28:46 +0000 (11:28 +0100)
committerSebastian Ramacher <sramacher@debian.org>
Tue, 21 Jan 2025 18:02:47 +0000 (19:02 +0100)
The hardware decoders need it and the packetizer can fill it for us.

(cherry picked from commit fe8b4bf937ad08d17d69de07ae21e9f326e2bd96) (edited)
edited:
- the extradata handling is missing many backports, adapting the to 3.0 code

Gbp-Pq: Name 0110-demux-mp4-force-the-packetizer-to-fill-AV1-extradata.patch

modules/demux/mp4/essetup.c

index 81d65508479f14898ee2f0016bba9ceda83eb241..5ac7af6b2376040d64d781072893513dcd28f0b0 100644 (file)
@@ -545,6 +545,8 @@ int SetupVideoES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
                                 BOXDATA(p_av1C)->i_av1C );
                         p_track->fmt.i_extra = BOXDATA(p_av1C)->i_av1C;
                     }
+                    if (p_track->fmt.i_extra <= 4)
+                        p_track->fmt.b_packetized = false; // force full extradata by the packetizer
                 }
             }
             break;