diff options
author | Ben Boeckel <mathstuf@gmail.com> | 2013-11-17 20:36:26 -0500 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-20 16:48:51 +0100 |
commit | 51a84a6bca611759c237aefe4408dbea8e153c04 (patch) | |
tree | feceb7d01db5b8f3356cc3840017d4166be62c94 /libavcodec/avcodec.h | |
parent | 1e506a2cc586935b9548870295dcbd680422e180 (diff) | |
download | ffmpeg-streaming-51a84a6bca611759c237aefe4408dbea8e153c04.zip ffmpeg-streaming-51a84a6bca611759c237aefe4408dbea8e153c04.tar.gz |
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>
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 5239bd7..68bb115 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -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. |