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_* *