-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Am 2016-06-24 um 22:49 schrieb Aaryaman Vasishta:
- if (FAILED(hr = IDirect3DRMDevice_QueryInterface(device, &IID_IDirect3DRMDevice3, (void **)&device3)))
return hr;
- if (FAILED(hr = IDirect3DRMFrame_QueryInterface(camera, &IID_IDirect3DRMFrame3, (void **)&camera3)))
- {
IDirect3DRMDevice3_Release(device3);
return hr;
- }
- IDirect3DRMDevice_Release(device);
- IDirect3DRMFrame_Release(camera);
- return d3drm_viewport2_Init(&viewport->IDirect3DRMViewport2_iface, device3, camera3, x, y, width, height);
This has the same problem as the first version of your frame thunks: You get "device3", but then you release "device", to which you don't hold a reference.
On Monday, June 27, 2016, Stefan Dösinger stefandoesinger@gmail.com wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Am 2016-06-24 um 22:49 schrieb Aaryaman Vasishta:
- if (FAILED(hr = IDirect3DRMDevice_QueryInterface(device,
&IID_IDirect3DRMDevice3, (void **)&device3)))
return hr;
- if (FAILED(hr = IDirect3DRMFrame_QueryInterface(camera,
&IID_IDirect3DRMFrame3, (void **)&camera3)))
- {
IDirect3DRMDevice3_Release(device3);
return hr;
- }
- IDirect3DRMDevice_Release(device);
- IDirect3DRMFrame_Release(camera);
- return d3drm_viewport2_Init(&viewport->IDirect3DRMViewport2_iface,
device3, camera3, x, y, width, height); This has the same problem as the first version of your frame thunks: You get "device3", but then you release "device", to which you don't hold a reference.
Right, I should probably release device3 after calling d3drm_viewport2_init.
Cheers, Aaryaman
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Am 2016-06-27 um 08:28 schrieb Aaryaman Vasishta:
Right, I should probably release device3 after calling d3drm_viewport2_init.
Either that, or use &impl->IDirect3DRMFrame3_iface, like you ended up doing in the other thunks.
On Tue, Jun 28, 2016 at 3:02 AM, Stefan Dösinger stefandoesinger@gmail.com wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Am 2016-06-27 um 08:28 schrieb Aaryaman Vasishta:
Right, I should probably release device3 after calling d3drm_viewport2_init.
Either that, or use &impl->IDirect3DRMFrame3_iface, like you ended up doing in the other thunks.
Getting IDirect3DRMFrame3_impl would require making
impl_from_IDirect3DRMFrame in order to get the struct. I'm fine with doing this as it avoids usage of QI. But for device3 you'd have to move both the struct declaration and avoid use of *_from_impl then, I think it's best left to be done in a separate patch later on.
Cheers, Aaryaman