diff mbox

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

Message ID 20190715143957.1277-1-jamrial@gmail.com
State New
Headers show

Commit Message

James Almer July 15, 2019, 2:39 p.m. UTC
Signed-off-by: James Almer <jamrial@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(-)

Comments

James Almer July 17, 2019, 6:45 p.m. UTC | #1
On 7/15/2019 11:39 AM, James Almer wrote:
> Signed-off-by: James Almer <jamrial@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.
Paul B Mahol July 17, 2019, 7:47 p.m. UTC | #2
LGTM

On 7/15/19, James Almer <jamrial@gmail.com> wrote:
> Signed-off-by: James Almer <jamrial@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;
>
> --
> 2.22.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
James Almer July 17, 2019, 8:58 p.m. UTC | #3
On 7/17/2019 4:47 PM, Paul B Mahol wrote:
> LGTM
> 
> On 7/15/19, James Almer <jamrial@gmail.com> wrote:
>> Signed-off-by: James Almer <jamrial@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;

Pushed, thanks.
diff mbox

Patch

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;