History

avcodec/mpegvideo: Don't zero unnecessarily

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

Andreas Rheinhardt committed 1 year ago

Commit 85692e51 parent b4e71351 file · +1 −1Browse files

Unified · Split

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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t