avformat/rtsp: use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/hdsenc: Use av_mallocz_array()

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