ffmpeg: Fix image allocation.

This probably fixes some of the use of uninitialized issues valgrind shows in fate.
It might also fix other issues.

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