On 17/02/2025 17:19, Romain Beauxis wrote: > libavcodec/decode.c: intercept `AV_PKT_DATA_METADATA_UPDATE` packet extra data, > attach them to the next decoded frame. > > The metadata needs to be cached because there is no guarantee that each packet > will generate a decoded frame immediately. > > `AV_PKT_DATA_METADATA_UPDATE` does not seem used in `libavcodec` at the moment > so regression risks seem low. > > This generic mechanism could be reused to support more in-band metadata update > in the future. Much cleaner than before, thanks. Which packets will not generate a decoded frame immediately? When it comes to audio, all of them should output something immediately. The code is correct, metadata updates could occur on B-frames in video. Just wondering.