diff mbox series

[FFmpeg-devel] avcodec/libvpxenc, cosmetics: prefer sizeof(var)

Message ID 20200104011612.256897-1-jzern@google.com
State New
Headers show
Series [FFmpeg-devel] avcodec/libvpxenc, cosmetics: prefer sizeof(var)
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

James Zern Jan. 4, 2020, 1:16 a.m. UTC
Signed-off-by: James Zern <jzern@google.com>
---
 libavcodec/libvpxenc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

James Almer Jan. 4, 2020, 1:19 a.m. UTC | #1
On 1/3/2020 10:16 PM, James Zern wrote:
> Signed-off-by: James Zern <jzern@google.com>
> ---
>  libavcodec/libvpxenc.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
> index 3f659b4b67..0b8a070304 100644
> --- a/libavcodec/libvpxenc.c
> +++ b/libavcodec/libvpxenc.c
> @@ -1041,8 +1041,7 @@ static int queue_frames(AVCodecContext *avctx, AVPacket *pkt_out)
>                  if (size < 0)
>                      return size;
>              } else {
> -                struct FrameListData *cx_frame =
> -                    av_malloc(sizeof(struct FrameListData));
> +                struct FrameListData *cx_frame = av_malloc(sizeof(*cx_frame));
>  
>                  if (!cx_frame) {
>                      av_log(avctx, AV_LOG_ERROR,

LGTM
James Zern Jan. 7, 2020, 6:37 a.m. UTC | #2
On Fri, Jan 3, 2020 at 5:28 PM James Almer <jamrial@gmail.com> wrote:
>
> On 1/3/2020 10:16 PM, James Zern wrote:
> > Signed-off-by: James Zern <jzern@google.com>
> > ---
> >  libavcodec/libvpxenc.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
> > index 3f659b4b67..0b8a070304 100644
> > --- a/libavcodec/libvpxenc.c
> > +++ b/libavcodec/libvpxenc.c
> > @@ -1041,8 +1041,7 @@ static int queue_frames(AVCodecContext *avctx, AVPacket *pkt_out)
> >                  if (size < 0)
> >                      return size;
> >              } else {
> > -                struct FrameListData *cx_frame =
> > -                    av_malloc(sizeof(struct FrameListData));
> > +                struct FrameListData *cx_frame = av_malloc(sizeof(*cx_frame));
> >
> >                  if (!cx_frame) {
> >                      av_log(avctx, AV_LOG_ERROR,
>
> LGTM

applied, thanks.
diff mbox series

Patch

diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 3f659b4b67..0b8a070304 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -1041,8 +1041,7 @@  static int queue_frames(AVCodecContext *avctx, AVPacket *pkt_out)
                 if (size < 0)
                     return size;
             } else {
-                struct FrameListData *cx_frame =
-                    av_malloc(sizeof(struct FrameListData));
+                struct FrameListData *cx_frame = av_malloc(sizeof(*cx_frame));
 
                 if (!cx_frame) {
                     av_log(avctx, AV_LOG_ERROR,