libavutil/hwcontext_dxva2: Add check for possible errors from GetAdapterDisplayModeEx
authorHumberto Ribeiro <mont3z.claro5@gmail.com>
Wed, 3 Jan 2018 23:22:15 +0000 (15:22 -0800)
committerwm4 <nfxjfg@googlemail.com>
Thu, 4 Jan 2018 14:41:40 +0000 (15:41 +0100)
commit59b126f92225316e0cd77bb952d630553801dc85
tree68b5d8170973230541f36fb0cffba2da5775bc4f
parent1b283c4a0dde1060ca1745f59a15cb8b77dfdaa5
libavutil/hwcontext_dxva2: Add check for possible errors from GetAdapterDisplayModeEx

This prevents a possible crash in CreateDeviceEx when using faulty
response from GetAdapterDisplayModeEx and allows ffmpeg to fallback to
classic d3d9.

Signed-off-by: wm4 <nfxjfg@googlemail.com>
libavutil/hwcontext_dxva2.c