avcodec/pthread_frame: Use av_mallocz_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/pthread_slice: Use av_malloc(z)_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>