From 056865a1d679640511f861a030e1c33aa1a46716 Mon Sep 17 00:00:00 2001 From: James Almer Date: Mon, 15 Jul 2019 11:38:36 -0300 Subject: [PATCH] avcodec: clarify the allocation requirements for intra_matrix and inter_matrix fields Reviewed-by: Paul B Mahol Signed-off-by: James Almer --- libavcodec/avcodec.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 2528bd89ab..d234271c5b 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;