avcodec/parser: use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/pthread_frame: Simplify code by using av_reallocp_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/pthread_slice: Use av_freep() to avoid leaving stale pointers in memory

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