diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-05-01 18:33:30 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-05-01 18:33:30 +0200 |
commit | 67731ef40f9f86ca870ae4c5dbbe01ead8dba962 (patch) | |
tree | 3e9a27bf178e0dc354322a74ac09485ca8ca4721 | |
parent | a5ba4e186bcb44c60f215e1367e3d5269b564cea (diff) | |
parent | af8a47905a3fa349a68841fac76b461b305c5efe (diff) | |
download | ffmpeg-67731ef40f9f86ca870ae4c5dbbe01ead8dba962.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
avutil: doxy: Small clarification for av_buffer_create()
avcodec: doxy: Clarify how to use buf[] when implementing get_buffer2()
avcodec: doxy: Clarify what get_buffer2 must fill in buf[]
Conflicts:
libavutil/buffer.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/avcodec.h | 13 | ||||
-rw-r--r-- | libavutil/buffer.h | 2 |
2 files changed, 10 insertions, 5 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index e5b0c2b176..d18b4347db 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2042,8 +2042,10 @@ typedef struct AVCodecContext { /** * This callback is called at the beginning of each frame to get data * buffer(s) for it. There may be one contiguous buffer for all the data or - * there may be a buffer per each data plane or anything in between. Each - * buffer must be reference-counted using the AVBuffer API. + * there may be a buffer per each data plane or anything in between. What + * this means is, you may set however many entries in buf[] you feel necessary. + * Each buffer must be reference-counted using the AVBuffer API (see description + * of buf[] below). * * The following fields will be set in the frame before this callback is * called: @@ -2064,8 +2066,11 @@ typedef struct AVCodecContext { * extended_data must be allocated with av_malloc() and will be freed in * av_frame_unref(). * * otherwise exended_data must point to data - * - buf[] must contain references to the buffers that contain the frame - * data. + * - buf[] must contain one or more pointers to AVBufferRef structures. Each of + * the frame's data and extended_data pointers must be contained in these. That + * is, one AVBufferRef for each allocated chunk of memory, not necessarily one + * AVBufferRef per data[] entry. See: av_buffer_create(), av_buffer_alloc(), + * and av_buffer_ref(). * - extended_buf and nb_extended_buf must be allocated with av_malloc() by * this callback and filled with the extra buffers if there are more * buffers than buf[] can hold. extended_buf will be freed in diff --git a/libavutil/buffer.h b/libavutil/buffer.h index bcd1130826..b4399fd39f 100644 --- a/libavutil/buffer.h +++ b/libavutil/buffer.h @@ -121,7 +121,7 @@ AVBufferRef *av_buffer_allocz(int size); * If this function fails, data is left untouched. * @param data data array * @param size size of data in bytes - * @param free a callback for freeing data + * @param free a callback for freeing this buffer's data * @param opaque parameter to be got for processing or passed to free * @param flags a combination of AV_BUFFER_FLAG_* * |