diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-13 16:29:56 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-15 18:19:19 +0200 |
commit | 6789b73a8188c9cdfd03eb066bfcee5f6350028c (patch) | |
tree | 5419e63d0d0d954621fee0f71d27c44326045cbb /libavcodec | |
parent | 9703f5d87d84f8b59724b5168e0c9b7e54bd887e (diff) | |
download | ffmpeg-6789b73a8188c9cdfd03eb066bfcee5f6350028c.tar.gz |
avcodec/mpegvideo: Don't zero unnecessarily
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegvideo.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index ff08168362..1190f29954 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -651,10 +651,10 @@ int ff_mpv_init_context_frame(MpegEncContext *s) s->dc_val_base[i] = 1024; } - /* which mb is an intra block, init macroblock skip table */ - if (!(s->mbintra_table = av_mallocz(mb_array_size)) || - // Note the + 1 is for a quicker MPEG-4 slice_end detection - !(s->mbskip_table = av_mallocz(mb_array_size + 2))) + // Note the + 1 is for a quicker MPEG-4 slice_end detection + if (!(s->mbskip_table = av_mallocz(mb_array_size + 2)) || + /* which mb is an intra block, init macroblock skip table */ + !(s->mbintra_table = av_malloc(mb_array_size))) return AVERROR(ENOMEM); memset(s->mbintra_table, 1, mb_array_size); |