Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2016-11-23 01:16:48 +0300
committerVittorio Giovara <vittorio.giovara@gmail.com>2016-11-23 18:36:13 +0300
commit79ff9935ae4ae90a4dd485bd9a3a440281d866b2 (patch)
tree1a2f9d686ed8c9c3e1177f2afc0d10de5a30e4d3 /libavformat/avformat.h
parent286ab878bd39b56008035638227b3ecb8ec5bbb7 (diff)
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. Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r--libavformat/avformat.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 65c3d90d4b..547b88b2f1 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1400,6 +1400,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