diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-10-04 12:08:20 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-12-06 10:22:18 +0100 |
commit | 31c51f7441de07b88cfea2550245bf1f5140cb8f (patch) | |
tree | 9e490166e4344542fbaaf064a5fead2be4f332f7 /libavcodec/avcodec.h | |
parent | b09ad37c83841c399abb7f2503a2ab214d0c2d48 (diff) | |
download | ffmpeg-31c51f7441de07b88cfea2550245bf1f5140cb8f.tar.gz |
avpacket: add a function for wrapping existing data as side data
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index e888952d4d..5ed13de81c 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3557,6 +3557,22 @@ uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int size); /** + * Wrap an existing array as a packet side data. + * + * @param pkt packet + * @param type side information type + * @param data the side data array. It must be allocated with the av_malloc() + * family of functions. The ownership of the data is transferred to + * pkt. + * @param size side information size + * @return a non-negative number on success, a negative AVERROR code on + * failure. On failure, the packet is unchanged and the data remains + * owned by the caller. + */ +int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type, + uint8_t *data, size_t size); + +/** * Shrink the already allocated side data buffer * * @param pkt packet |