mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
avutil/frame: add av_frame_replace
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
63767b79a5
commit
01d444c077
4 changed files with 142 additions and 1 deletions
|
|
@ -836,6 +836,19 @@ void av_frame_free(AVFrame **frame);
|
|||
*/
|
||||
int av_frame_ref(AVFrame *dst, const AVFrame *src);
|
||||
|
||||
/**
|
||||
* Ensure the destination frame refers to the same data described by the source
|
||||
* frame, either by creating a new reference for each AVBufferRef from src if
|
||||
* they differ from those in dst, by allocating new buffers and copying data if
|
||||
* src is not reference counted, or by unrefencing it if src is empty.
|
||||
*
|
||||
* Frame properties on dst will be replaced by those from src.
|
||||
*
|
||||
* @return 0 on success, a negative AVERROR on error. On error, dst is
|
||||
* unreferenced.
|
||||
*/
|
||||
int av_frame_replace(AVFrame *dst, const AVFrame *src);
|
||||
|
||||
/**
|
||||
* Create a new frame that references the same data as src.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue