summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-08-03 18:33:03 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-08-04 04:16:43 +0200
commitd903b62750b3fe0cd6d66330db0e8f010ae527c1 (patch)
treed7caf665de1aea191876b87d2c08cc82b252a6a1 /libavcodec
parent5750d6c5e9d184488f4dc0f9e81cbcc28cb2f2d1 (diff)
avcodec/internal: improve min_size documentation for ff_alloc_packet2()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/internal.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index 202f82d7e5..0daf6695e6 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -217,9 +217,14 @@ int avpriv_unlock_avformat(void);
* avpkt->size is set to the specified size.
* All other AVPacket fields will be reset with av_init_packet().
* @param size the minimum required packet size
- * @param min_size the smallest the packet might be down sized to, can be set to
- * 0, setting this roughly correctly allows the allocation code
- * to choose between several allocation stragies to improve
+ * @param min_size This is a hint to the allocation algorithm, which indicates
+ * to what minimal size the caller might later shrink the packet
+ * 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.
* @return non negative on success, negative error code on failure
*/