aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vda.h
diff options
context:
space:
mode:
authorXidorn Quan <quanxunzhen@gmail.com>2013-05-21 12:12:30 +0800
committerSebastien Zwickert <dilaroga@gmail.com>2013-05-27 09:05:55 +0200
commitffd7fd79441f97f1edb25181af0603ff6ea9b342 (patch)
treebc4d4d4314d682acbd3aff4241d434b6f01e6843 /libavcodec/vda.h
parent53ec1c811e41807a296934eb142f4aebe787e390 (diff)
downloadffmpeg-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.h11
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. */