mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-11-03 09:41:17 +08:00
avutil/frame: Add private_ref to AVFrame
This gives FFmpeg libs a field that they can freely and safely use. Avoiding the need of wrapping of a users opaque_ref field and its issues. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Timo Rothenpieler
parent
dd435c957a
commit
1fa3a9a31d
@@ -563,6 +563,19 @@ typedef struct AVFrame {
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* AVBufferRef for internal use by a single libav* library.
|
||||
* Must not be used to transfer data between libraries.
|
||||
* Has to be NULL when ownership of the frame leaves the respective library.
|
||||
*
|
||||
* Code outside the FFmpeg libs should never check or change the contents of the buffer ref.
|
||||
*
|
||||
* FFmpeg calls av_buffer_unref() on it when the frame is unreferenced.
|
||||
* av_frame_copy_props() calls create a new reference with av_buffer_ref()
|
||||
* for the target frame's private_ref field.
|
||||
*/
|
||||
AVBufferRef *private_ref;
|
||||
} AVFrame;
|
||||
|
||||
#if FF_API_FRAME_GET_SET
|
||||
|
||||
Reference in New Issue
Block a user