Partial fix for ffmpeg VAAPI

This only partialy fixes ffmpeg.
It still is very crashy with vaapi, even with this patch.
Specialy mpeg2 decoding always crashes.

Upstream commit is b066d90211072c7532e17c0c54d8475f10fc97ad

Without this patch, xbmc always crashes when using vaapi.