diff options
author | Luc Trudeau <ltrudeau@twoorioles.com> | 2020-02-20 23:01:43 +0300 |
---|---|---|
committer | Luc Trudeau <ltrudeau@twoorioles.com> | 2020-02-20 23:01:43 +0300 |
commit | 0c88560789b4388cc1d2113110574040606a0b45 (patch) | |
tree | a52b11c9739e6240355c1bdd753550fbbac20c24 /src/lib.c | |
parent | bf56afde17cdf40303f8d3ec5bca549bc57866c5 (diff) |
Replace malloc+memset(0) with calloc
Diffstat (limited to 'src/lib.c')
-rw-r--r-- | src/lib.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -148,10 +148,8 @@ COLD int dav1d_open(Dav1dContext **const c_out, const Dav1dSettings *const s) { memset(c->fc, 0, sizeof(*c->fc) * s->n_frame_threads); if (c->n_fc > 1) { c->frame_thread.out_delayed = - malloc(sizeof(*c->frame_thread.out_delayed) * c->n_fc); + calloc(c->n_fc, sizeof(*c->frame_thread.out_delayed)); if (!c->frame_thread.out_delayed) goto error; - memset(c->frame_thread.out_delayed, 0, - sizeof(*c->frame_thread.out_delayed) * c->n_fc); } for (int n = 0; n < s->n_frame_threads; n++) { Dav1dFrameContext *const f = &c->fc[n]; |