avfilter/pthread: Use av_mallocz_array()