[FFmpeg-cvslog] lavc: rewrite and extend AVFrame doxy

Anton Khirnov git at videolan.org
Sun Dec 23 13:51:18 CET 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Dec 21 21:50:50 2012 +0100| [418693bdc5edad72b0d055f741931612d797eb05] | committer: Anton Khirnov

lavc: rewrite and extend AVFrame doxy

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=418693bdc5edad72b0d055f741931612d797eb05
---

 libavcodec/avcodec.h |   18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index d12c72b..d9a2dc2 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -972,11 +972,19 @@ enum AVSideDataParamChangeFlags {
  */
 
 /**
- * Audio Video Frame.
- * New fields can be added to the end of AVFRAME with minor version
- * bumps. Removal, reordering and changes to existing fields require
- * a major version bump.
- * sizeof(AVFrame) must not be used outside libav*.
+ * This structure describes decoded (raw) audio or video data.
+ *
+ * AVFrame must be allocated using avcodec_alloc_frame() and freed with
+ * avcodec_free_frame(). Note that this allocates only the AVFrame itself. The
+ * buffers for the data must be managed through other means.
+ *
+ * AVFrame is typically allocated once and then reused multiple times to hold
+ * different data (e.g. a single AVFrame to hold frames received from a
+ * decoder). In such a case, avcodec_get_frame_defaults() should be used to
+ * reset the frame to its original clean state before it is reused again.
+ *
+ * sizeof(AVFrame) is not a part of the public ABI, so new fields may be added
+ * to the end with a minor bump.
  */
 typedef struct AVFrame {
 #define AV_NUM_DATA_POINTERS 8



More information about the ffmpeg-cvslog mailing list