1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/mpegvideo: Don't zero unnecessarily

The whole dc_val array is initialized (to 1024) immediately
after the allocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-06-14 00:39:27 +02:00
parent b4e7135986
commit 85692e5da1

View File

@ -340,7 +340,7 @@ av_cold int ff_mpv_init_context_frame(MpegEncContext *s)
// MN: we need these for error resilience of intra-frames // MN: we need these for error resilience of intra-frames
// Allocating them unconditionally for decoders also means // Allocating them unconditionally for decoders also means
// that we don't need to reinitialize when e.g. h263_aic changes. // that we don't need to reinitialize when e.g. h263_aic changes.
if (!FF_ALLOCZ_TYPED_ARRAY(s->dc_val_base, yc_size)) if (!FF_ALLOC_TYPED_ARRAY(s->dc_val_base, yc_size))
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
s->dc_val[0] = s->dc_val_base + s->b8_stride + 1; s->dc_val[0] = s->dc_val_base + s->b8_stride + 1;
s->dc_val[1] = s->dc_val_base + y_size + s->mb_stride + 1; s->dc_val[1] = s->dc_val_base + y_size + s->mb_stride + 1;