Replace av_malloc() and memset(0) by av_mallocz()