diff options
author | Xidorn Quan <quanxunzhen@gmail.com> | 2013-05-21 12:12:30 +0800 |
---|---|---|
committer | Sebastien Zwickert <dilaroga@gmail.com> | 2013-05-27 09:05:55 +0200 |
commit | ffd7fd79441f97f1edb25181af0603ff6ea9b342 (patch) | |
tree | bc4d4d4314d682acbd3aff4241d434b6f01e6843 /libavcodec/vda.h | |
parent | 53ec1c811e41807a296934eb142f4aebe787e390 (diff) | |
download | ffmpeg-ffd7fd79441f97f1edb25181af0603ff6ea9b342.tar.gz |
avcodec/vda_h264: use av_buffer to manage buffers
This patch fixes a leak of buffer when seeking occurs.
It adds a flag in struct vda_context for compatibility with apps which
currently use it. If the flag is not set, the hwaccel will behave like
before.
Signed-off-by: Sebastien Zwickert <dilaroga@gmail.com>
Diffstat (limited to 'libavcodec/vda.h')
-rw-r--r-- | libavcodec/vda.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/vda.h b/libavcodec/vda.h index 281785f294..b3d6399a65 100644 --- a/libavcodec/vda.h +++ b/libavcodec/vda.h @@ -134,6 +134,17 @@ struct vda_context { * - decoding: Set/Unset by libavcodec. */ int priv_allocated_size; + + /** + * Use av_buffer to manage buffer. + * When the flag is set, the CVPixelBuffers returned by the decoder will + * be released automatically, so you have to retain them if necessary. + * Not setting this flag may cause memory leak. + * + * encoding: unused + * decoding: Set by user. + */ + int use_ref_buffer; }; /** Create the video decoder. */ |