lavc: fix 10l oversight in realloc of avcodec_encode_video2.
Packets are not guranteed to be allocated by av_malloc().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>