[MPlayer-dev-eng] [PATCH] Direct3D VO better handling of uncooperative video adapter

Georgi Petrov gogothebee at gmail.com
Tue Feb 3 12:00:22 CET 2009


> If we change it to &&, then in case priv->d3d_device is NULL, the
> second if condition will be probed, which will result in Present on a
> NULL pointer.

And if you though about doing it:

if (priv->d3d_device &&
   FAILED(IDirect3DDevice9_Present(priv->d3d_device, &rect, 0, 0, 0)))

Note the omission of ! in front of priv->d3d_device.

Then it will be wrong again, because if priv->d3d_device is NULL, the
whole if will fail and no reinit will be tried.



More information about the MPlayer-dev-eng mailing list