avcodec/mpegvideo: Don't zero unnecessarily

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-08-13 16:29:56 +02:00
parent 9703f5d87d
commit 6789b73a81
1 changed files with 4 additions and 4 deletions

View File

@ -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);