vlc | branch: master | Steve Lhomme <[email protected]> | Wed Jun 26 11:21:26 2019 +0200| [3d7e37212c99a991807815479998bc0b2da9fb8b] | committer: Steve Lhomme
d3d9_fmt: don't check for the texture size early Creating textures will fail if it's too big anyway. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3d7e37212c99a991807815479998bc0b2da9fb8b --- modules/codec/avcodec/dxva2.c | 2 +- modules/video_chroma/d3d9_fmt.c | 12 +----------- modules/video_chroma/d3d9_fmt.h | 4 ++-- modules/video_output/win32/direct3d9.c | 4 ++-- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c index d9c6f5efd6..36a5fee439 100644 --- a/modules/codec/avcodec/dxva2.c +++ b/modules/codec/avcodec/dxva2.c @@ -359,7 +359,7 @@ static int D3dCreateDevice(vlc_va_t *va, const video_format_t *fmt) return VLC_SUCCESS; } - HRESULT hr = D3D9_CreateDevice(va, &sys->hd3d, NULL, fmt, &sys->d3d_dev); + HRESULT hr = D3D9_CreateDevice(va, &sys->hd3d, NULL, &sys->d3d_dev); if (FAILED(hr)) { msg_Err(va, "IDirect3D9_CreateDevice failed"); diff --git a/modules/video_chroma/d3d9_fmt.c b/modules/video_chroma/d3d9_fmt.c index 56c5488126..1fa46deef4 100644 --- a/modules/video_chroma/d3d9_fmt.c +++ b/modules/video_chroma/d3d9_fmt.c @@ -32,7 +32,7 @@ typedef picture_sys_d3d9_t VA_PICSYS; #undef D3D9_CreateDevice HRESULT D3D9_CreateDevice(vlc_object_t *o, d3d9_handle_t *hd3d, HWND hwnd, - const video_format_t *source, d3d9_device_t *out) + d3d9_device_t *out) { HRESULT hr; @@ -70,16 +70,6 @@ HRESULT D3D9_CreateDevice(vlc_object_t *o, d3d9_handle_t *hd3d, HWND hwnd, return E_INVALIDARG; } - if ( source->i_width > out->caps.MaxTextureWidth || - source->i_height > out->caps.MaxTextureHeight ) - { - msg_Err(o, "Textures too large %ux%u max possible: %ux%u", - source->i_width, source->i_height, - (unsigned) out->caps.MaxTextureWidth, - (unsigned) out->caps.MaxTextureHeight); - return E_INVALIDARG; - } - out->adapterId = AdapterToUse; out->hwnd = hwnd; /* TODO only create a device for the decoder dimensions */ diff --git a/modules/video_chroma/d3d9_fmt.h b/modules/video_chroma/d3d9_fmt.h index 968d103b69..d9184fdaf4 100644 --- a/modules/video_chroma/d3d9_fmt.h +++ b/modules/video_chroma/d3d9_fmt.h @@ -96,8 +96,8 @@ static inline void ReleaseD3D9PictureSys(picture_sys_d3d9_t *p_sys) } HRESULT D3D9_CreateDevice(vlc_object_t *, d3d9_handle_t *, HWND, - const video_format_t *, d3d9_device_t *out); -#define D3D9_CreateDevice(a,b,c,d,e) D3D9_CreateDevice( VLC_OBJECT(a), b, c, d, e ) + d3d9_device_t *out); +#define D3D9_CreateDevice(a,b,c,d) D3D9_CreateDevice( VLC_OBJECT(a), b, c, d ) HRESULT D3D9_CreateDeviceExternal(IDirect3DDevice9 *, d3d9_handle_t *, HWND, d3d9_device_t *out); diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c index 1558b2f431..a73b9d46e5 100644 --- a/modules/video_output/win32/direct3d9.c +++ b/modules/video_output/win32/direct3d9.c @@ -1512,7 +1512,7 @@ static int Direct3D9Open(vout_display_t *vd, video_format_t *fmt, &sys->d3d_dev); else hr = D3D9_CreateDevice(vd, &sys->hd3d, sys->sys.hvideownd, - &vd->source, &sys->d3d_dev); + &sys->d3d_dev); if (FAILED(hr)) { msg_Err( vd, "D3D9 Creation failed! (hr=0x%lX)", hr); @@ -1993,7 +1993,7 @@ GLConvOpen(vlc_object_t *obj) } if (FAILED(D3D9_CreateDevice(obj, &priv->hd3d, tc->gl->surface->handle.hwnd, - &tc->fmt, &priv->d3d_dev))) + &priv->d3d_dev))) goto error; HRESULT hr; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
