[FFmpeg-devel] [PATCH v5 1/6] libavcodec: Add generic metadata injection using AV_PKT_DATA_METADATA_UPDATE

Lynne dev at lynne.ee
Mon Feb 17 21:10:35 EET 2025


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xA2FEA5F03F034464.asc
Type: application/pgp-keys
Size: 624 bytes
Desc: OpenPGP public key
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250217/5c5e317c/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250217/5c5e317c/attachment.sig>


More information about the ffmpeg-devel mailing list