diff options
author | Rostislav Pehlivanov <atomnuker@gmail.com> | 2017-10-17 23:57:28 +0100 |
---|---|---|
committer | Rostislav Pehlivanov <atomnuker@gmail.com> | 2018-03-01 20:37:18 +0000 |
commit | 6731f60598963da357ff77dafe9e5e903629bde9 (patch) | |
tree | f0330ba2d1d9f18b263dc6f53f0858855024392e /libavutil/frame.h | |
parent | 1be4c8579024bd44265ce2f63c6a090aa1b21bc4 (diff) |
frame: add an av_frame_new_side_data_from_buf function
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Diffstat (limited to 'libavutil/frame.h')
-rw-r--r-- | libavutil/frame.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libavutil/frame.h b/libavutil/frame.h index d54bd9a354..59cee8ceab 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -801,6 +801,22 @@ AVFrameSideData *av_frame_new_side_data(AVFrame *frame, int size); /** + * Add a new side data to a frame from an existing AVBufferRef + * + * @param frame a frame to which the side data should be added + * @param type the type of the added side data + * @param buf an AVBufferRef to add as side data. The ownership of + * the reference is transferred to the frame. + * + * @return newly added side data on success, NULL on error. On failure + * the frame is unchanged and the AVBufferRef remains owned by + * the caller. + */ +AVFrameSideData *av_frame_new_side_data_from_buf(AVFrame *frame, + enum AVFrameSideDataType type, + AVBufferRef *buf); + +/** * @return a pointer to the side data of a given type on success, NULL if there * is no side data with such type in this frame. */ |