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>
This commit is contained in:
Michael Niedermayer 2013-05-01 18:33:30 +02:00
commit 67731ef40f
2 changed files with 10 additions and 5 deletions

View File

@ -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

View File

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