On 7/7/19, Ulf Zibis <[email protected]> wrote: > > Am 07.07.19 um 14:29 schrieb Paul B Mahol: >> On 7/7/19, Ulf Zibis <[email protected]> wrote: >>> Am 07.07.19 um 13:51 schrieb Paul B Mahol: >>>> There is av_calloc, it calls memset for you after allocation >>> Thanks for the hint. I now have: >>> if (s->report >= R_SHIFTS) { >>> s->shifts_sums = av_malloc((s->lines + 1) * >>> sizeof(*s->shifts_sums)); >> This above needs to be calloc. > > Unfortunately this doesn't help. So I ask:
Maybe: s->shifts_sums = av_calloc(s->lines + 1, sizeof(**s->shifts_sums)); > > Isn't this enough initialization? : > for (int l = s->lines; l >= 0; l--) > s->shifts_sums[l] = av_calloc(s->span_r - s->span_l + 1, > sizeof(**s->shifts_sums)); > I don't get, why I first should write NULLs into the elements of > s->shifts_sums[l]. > > -Ulf > > > _______________________________________________ > ffmpeg-user mailing list > [email protected] > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > [email protected] with subject "unsubscribe". _______________________________________________ ffmpeg-user mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
