diff mbox series

[FFmpeg-devel] avcodec: be more explicit about the buffer size in get_encode_buffer documentation

Message ID 20210505021202.2157-1-jamrial@gmail.com
State Accepted
Commit 5b5398722ef96510e8f9419c49490c92449075ce
Headers show
Series [FFmpeg-devel] avcodec: be more explicit about the buffer size in get_encode_buffer documentation
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

James Almer May 5, 2021, 2:12 a.m. UTC
Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/avcodec.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

James Almer May 7, 2021, 4:16 p.m. UTC | #1
On 5/4/2021 11:12 PM, James Almer wrote:
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>   libavcodec/avcodec.h | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index 0ef1676daf..3cf131d0a5 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -2097,6 +2097,10 @@ typedef struct AVCodecContext {
>        * This callback must use the above value to calculate the required buffer size,
>        * which must padded by at least AV_INPUT_BUFFER_PADDING_SIZE bytes.
>        *
> +     * In some specific cases, the encoder may not use the entire buffer allocated by this
> +     * callback. This will be reflected in the size value in the packet once returned by
> +     * avcodec_receive_packet().
> +     *
>        * This callback must fill the following fields in the packet:
>        * - data: alignment requirements for AVPacket apply, if any. Some architectures and
>        *   encoders may benefit from having aligned data.

Will apply.
diff mbox series

Patch

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 0ef1676daf..3cf131d0a5 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2097,6 +2097,10 @@  typedef struct AVCodecContext {
      * This callback must use the above value to calculate the required buffer size,
      * which must padded by at least AV_INPUT_BUFFER_PADDING_SIZE bytes.
      *
+     * In some specific cases, the encoder may not use the entire buffer allocated by this
+     * callback. This will be reflected in the size value in the packet once returned by
+     * avcodec_receive_packet().
+     *
      * This callback must fill the following fields in the packet:
      * - data: alignment requirements for AVPacket apply, if any. Some architectures and
      *   encoders may benefit from having aligned data.