avutil/hwcontext_dxva2: return an error when buffer allocation fails

This also prevents the use of an uninitialized variable.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
