aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-05-11 14:05:22 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-06-08 12:52:49 +0200
commit4e5d2a819c7a0cda68373fa61162b473e0dace67 (patch)
treebfbe46edcebf249d3384aa96827d2caf46e1cd8c
parent7a57c5ab915a26afd03447ba130cf88c5f8dca77 (diff)
downloadffmpeg-4e5d2a819c7a0cda68373fa61162b473e0dace67.tar.gz
avcodec/internal: Remove outdated documentation of ff_alloc_packet2()
Its documentation described the way user-supplied buffers worked before 93016f5d1d280f9cb7856883af287fa66affc04c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/internal.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index 60f65d3f2c..ac3d50df9c 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -229,20 +229,16 @@ void ff_color_frame(AVFrame *frame, const int color[4]);
#define FF_MAX_EXTRADATA_SIZE ((1 << 28) - AV_INPUT_BUFFER_PADDING_SIZE)
/**
- * Check AVPacket size and/or allocate data.
+ * Check AVPacket size and allocate data.
*
* Encoders supporting AVCodec.encode2() can use this as a convenience to
- * ensure the output packet data is large enough, whether provided by the user
- * or allocated in this function.
+ * obtain a big enough buffer for the encoded bitstream.
*
* @param avctx the AVCodecContext of the encoder
- * @param avpkt the AVPacket
- * If avpkt->data is already set, avpkt->size is checked
- * to ensure it is large enough.
- * If avpkt->data is NULL, a new buffer is allocated.
- * 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 avpkt The AVPacket: on success, avpkt->data will point to a buffer
+ * of size at least `size`; the packet will not be refcounted.
+ * This packet must be initially blank.
+ * @param size an upper bound of the size of the packet to encode
* @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