diff mbox series

[FFmpeg-devel,06/11] avcodec/evc_parse: use the correct struct size when allocating pps

Message ID 20230615151836.50535-6-jamrial@gmail.com
State New
Headers show
Series [FFmpeg-devel,01/11] avformat/evcdec: set the demuxer as AVFMT_NOTIMESTAMPS | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

James Almer June 15, 2023, 3:18 p.m. UTC
Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/evc_parse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul B Mahol June 15, 2023, 3:20 p.m. UTC | #1
On Thu, Jun 15, 2023 at 5:20 PM James Almer <jamrial@gmail.com> wrote:

> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  libavcodec/evc_parse.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/evc_parse.c b/libavcodec/evc_parse.c
> index 71e2605281..b3044eca3f 100644
> --- a/libavcodec/evc_parse.c
> +++ b/libavcodec/evc_parse.c
> @@ -357,7 +357,7 @@ EVCParserPPS *ff_evc_parse_pps(EVCParserContext *ctx,
> const uint8_t *bs, int bs_
>          return NULL;
>
>      if(!ctx->pps[pps_pic_parameter_set_id]) {
> -        if((ctx->pps[pps_pic_parameter_set_id] =
> av_malloc(sizeof(EVCParserSPS))) == NULL)
> +        if((ctx->pps[pps_pic_parameter_set_id] =
> av_malloc(sizeof(EVCParserPPS))) == NULL)
>              return NULL;
>      }
>
>
Please fix  code style of lines you change.
diff mbox series

Patch

diff --git a/libavcodec/evc_parse.c b/libavcodec/evc_parse.c
index 71e2605281..b3044eca3f 100644
--- a/libavcodec/evc_parse.c
+++ b/libavcodec/evc_parse.c
@@ -357,7 +357,7 @@  EVCParserPPS *ff_evc_parse_pps(EVCParserContext *ctx, const uint8_t *bs, int bs_
         return NULL;
 
     if(!ctx->pps[pps_pic_parameter_set_id]) {
-        if((ctx->pps[pps_pic_parameter_set_id] = av_malloc(sizeof(EVCParserSPS))) == NULL)
+        if((ctx->pps[pps_pic_parameter_set_id] = av_malloc(sizeof(EVCParserPPS))) == NULL)
             return NULL;
     }