avcodec/internal: improve min_size documentation for ff_alloc_packet2()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2015-08-03 18:33:03 +02:00
parent 5750d6c5e9
commit d903b62750
1 changed files with 8 additions and 3 deletions

View File

@ -217,9 +217,14 @@ int avpriv_unlock_avformat(void);
* avpkt->size is set to the specified size. * avpkt->size is set to the specified size.
* All other AVPacket fields will be reset with av_init_packet(). * All other AVPacket fields will be reset with av_init_packet().
* @param size the minimum required packet size * @param size the minimum required packet size
* @param min_size the smallest the packet might be down sized to, can be set to * @param min_size This is a hint to the allocation algorithm, which indicates
* 0, setting this roughly correctly allows the allocation code * to what minimal size the caller might later shrink the packet
* to choose between several allocation stragies to improve * to. Encoders often allocate packets which are larger than the
* amount of data that is written into them as the exact amount is
* not known at the time of allocation. min_size represents the
* size a packet might be shrunk to by the caller. Can be set to
* 0. setting this roughly correctly allows the allocation code
* to choose between several allocation strategies to improve
* speed slightly. * speed slightly.
* @return non negative on success, negative error code on failure * @return non negative on success, negative error code on failure
*/ */