[vlc-commits] d3d9: don't store the adapter ID twice in the decoder device
Steve Lhomme
git at videolan.org
Thu Nov 21 13:51:19 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Nov 21 10:08:30 2019 +0100| [e18b85dd70f9f2b242717cea0081deb2f5d85f1d] | committer: Steve Lhomme
d3d9: don't store the adapter ID twice in the decoder device
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e18b85dd70f9f2b242717cea0081deb2f5d85f1d
---
modules/codec/avcodec/dxva2.c | 2 +-
modules/hw/d3d9/d3d9_device.c | 1 -
modules/video_chroma/d3d9_fmt.h | 1 -
modules/video_output/win32/direct3d9.c | 4 ++--
4 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index fa58161cab..b67e9cefa0 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -266,7 +266,7 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, const AVPixFmtDescriptor *des
if (unlikely(sys == NULL))
return VLC_ENOMEM;
- HRESULT hr = D3D9_CreateDevice(va, &d3d9_decoder->hd3d, d3d9_decoder->adapter, &sys->d3d_dev);
+ HRESULT hr = D3D9_CreateDevice(va, &d3d9_decoder->hd3d, d3d9_decoder->d3ddev.adapterId, &sys->d3d_dev);
if ( FAILED(hr) )
{
free( sys );
diff --git a/modules/hw/d3d9/d3d9_device.c b/modules/hw/d3d9/d3d9_device.c
index 5bc8e2373d..fd205f3a28 100644
--- a/modules/hw/d3d9/d3d9_device.c
+++ b/modules/hw/d3d9/d3d9_device.c
@@ -110,7 +110,6 @@ int D3D9OpenDecoderDevice(vlc_decoder_device *device, vout_window_t *wnd)
D3D9_Destroy( &sys->dec_device.hd3d );
goto error;
}
- sys->dec_device.adapter = sys->dec_device.d3ddev.adapterId;
device->ops = &d3d9_dev_ops;
device->opaque = &sys->dec_device;
diff --git a/modules/video_chroma/d3d9_fmt.h b/modules/video_chroma/d3d9_fmt.h
index 35edc37114..23c75f669f 100644
--- a/modules/video_chroma/d3d9_fmt.h
+++ b/modules/video_chroma/d3d9_fmt.h
@@ -74,7 +74,6 @@ typedef struct
{
d3d9_handle_t hd3d;
d3d9_device_t d3ddev;
- int adapter;
} d3d9_decoder_device_t;
typedef struct
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index e73eba54b0..91996fa906 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -1674,7 +1674,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
sys->d3d9_device = NULL;
goto error;
}
- sys->d3d9_device->adapter = -1;
+ sys->d3d9_device->d3ddev.adapterId = -1;
}
d3d9_video_context_t *octx = GetD3D9ContextPrivate(context);
@@ -1682,7 +1682,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
if (octx != NULL)
hr = D3D9_CreateDeviceExternal(octx->dev, &sys->d3d9_device->hd3d, &sys->d3d_dev);
else
- hr = D3D9_CreateDevice(vd, &sys->d3d9_device->hd3d, sys->d3d9_device->adapter, &sys->d3d_dev);
+ hr = D3D9_CreateDevice(vd, &sys->d3d9_device->hd3d, sys->d3d9_device->d3ddev.adapterId, &sys->d3d_dev);
if (FAILED(hr)) {
msg_Err( vd, "D3D9 Creation failed! (hr=0x%lX)", hr);
More information about the vlc-commits
mailing list