diff options
author | James Almer <jamrial@gmail.com> | 2016-11-17 08:02:41 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2016-11-19 04:17:13 +0300 |
commit | 2ab50647ff653ab45d9d78203b6a671124609991 (patch) | |
tree | 781850fb7ca50af41350fdca52b4d9a40f8baf4f /libavformat/avformat.h | |
parent | 4696f7639b22c9205792d2e3d5e8e07b3cadbb63 (diff) |
avformat/utils: add av_stream_add_side_data()
Functionally similar to av_packet_add_side_data(). Allows the use of an
already allocated buffer as stream side data.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index f9f4d725f5..7c696145ae 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -2049,6 +2049,21 @@ const AVClass *avformat_get_class(void); AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c); /** + * Wrap an existing array as stream side data. + * + * @param st stream + * @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 + * st. + * @param size side information size + * @return zero on success, a negative AVERROR code on failure. On failure, + * the stream is unchanged and the data remains owned by the caller. + */ +int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type, + uint8_t *data, size_t size); + +/** * Allocate new information from stream. * * @param stream stream |