mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-01-05 21:55:37 +01:00
avpacket: add pack/unpack functions for AVDictionary
These functions are intended for use with side_data which comes in an AVPacket. Signed-off-by: Ben Boeckel <mathstuf@gmail.com> Reviewed-by: wm4 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
1e506a2cc5
commit
51a84a6bca
@@ -3587,6 +3587,24 @@ int av_packet_merge_side_data(AVPacket *pkt);
|
||||
|
||||
int av_packet_split_side_data(AVPacket *pkt);
|
||||
|
||||
/**
|
||||
* Pack a dictionary for use in side_data.
|
||||
*
|
||||
* @param dict The dictionary to pack.
|
||||
* @param size pointer to store the size of the returned data
|
||||
* @return pointer to data if successful, NULL otherwise
|
||||
*/
|
||||
uint8_t *av_packet_pack_dictionary(AVDictionary *dict, int *size);
|
||||
/**
|
||||
* Unpack a dictionary from side_data.
|
||||
*
|
||||
* @param data data from side_data
|
||||
* @param size size of the data
|
||||
* @param dict the metadata storage dictionary
|
||||
* @return 0 on success, < 0 on failure
|
||||
*/
|
||||
int av_packet_unpack_dictionary(const uint8_t *data, int size, AVDictionary **dict);
|
||||
|
||||
|
||||
/**
|
||||
* Convenience function to free all the side data stored.
|
||||
|
||||
Reference in New Issue
Block a user