[FFmpeg-cvslog] avcodec/mpegvideo: Don't zero unnecessarily
Andreas Rheinhardt
git at videolan.org
Sat Jun 21 23:20:50 EEST 2025
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat Jun 14 00:39:27 2025 +0200| [85692e5da1eae28c582fd2c5fb6a1620e824ca96] | committer: Andreas Rheinhardt
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 at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=85692e5da1eae28c582fd2c5fb6a1620e824ca96
---
libavcodec/mpegvideo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 84736f8b5b..e329771b38 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -340,7 +340,7 @@ av_cold int ff_mpv_init_context_frame(MpegEncContext *s)
// MN: we need these for error resilience of intra-frames
// Allocating them unconditionally for decoders also means
// 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);
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;
More information about the ffmpeg-cvslog
mailing list