[FFmpeg-devel] [PATCH] avcodec: list the allocation requirements for intra_matrix and inter_matrix fields

James Almer jamrial at gmail.com
Wed Jul 17 21:45:43 EEST 2019


On 7/15/2019 11:39 AM, James Almer wrote:
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
> See https://git.videolan.org/?p=vlc.git;a=commitdiff;h=d86c4c87aa78130a4fd00294e25df865d0e2b327
> 
>  libavcodec/avcodec.h | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index 2528bd89ab..646b8f05fc 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -2057,15 +2057,19 @@ typedef struct AVCodecContext {
>  
>      /**
>       * custom intra quantization matrix
> -     * - encoding: Set by user, can be NULL.
> -     * - decoding: Set by libavcodec.
> +     * Must be allocated with the av_malloc() family of functions, and will be freed in
> +     * avcodec_free_context().
> +     * - encoding: Set/allocated by user. Freed by libavcodec. Can be NULL.
> +     * - decoding: Set/allocated/freed by libavcodec.
>       */
>      uint16_t *intra_matrix;
>  
>      /**
>       * custom inter quantization matrix
> -     * - encoding: Set by user, can be NULL.
> -     * - decoding: Set by libavcodec.
> +     * Must be allocated with the av_malloc() family of functions, and will be freed in
> +     * avcodec_free_context().
> +     * - encoding: Set/allocated by user. Freed by libavcodec. Can be NULL.
> +     * - decoding: Set/allocated/freed by libavcodec.
>       */
>      uint16_t *inter_matrix;

Ping.


More information about the ffmpeg-devel mailing list