Commit 4e28f09f authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

dxva: use the surface width/height from input format in create_decoder_surfaces

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent bbf96f32
......@@ -860,8 +860,8 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id,
{
D3D11_TEXTURE2D_DESC texDesc;
ZeroMemory(&texDesc, sizeof(texDesc));
texDesc.Width = dx_sys->va_pool.surface_width;
texDesc.Height = dx_sys->va_pool.surface_height;
texDesc.Width = fmt->i_width;
texDesc.Height = fmt->i_height;
texDesc.MipLevels = 1;
texDesc.Format = sys->render;
texDesc.SampleDesc.Count = 1;
......@@ -905,7 +905,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id,
}
}
msg_Dbg(va, "ID3D11VideoDecoderOutputView succeed with %d surfaces (%dx%d)",
surface_count, dx_sys->va_pool.surface_width, dx_sys->va_pool.surface_height);
surface_count, fmt->i_width, fmt->i_height);
D3D11_VIDEO_DECODER_DESC decoderDesc;
ZeroMemory(&decoderDesc, sizeof(decoderDesc));
......
......@@ -657,8 +657,8 @@ static int DxCreateVideoDecoder(vlc_va_t *va, int codec_id,
HRESULT hr;
hr = IDirectXVideoDecoderService_CreateSurface(sys->d3ddec,
sys->va_pool.surface_width,
sys->va_pool.surface_height,
fmt->i_width,
fmt->i_width,
surface_count - 1,
p_sys->render,
D3DPOOL_DEFAULT,
......@@ -671,12 +671,12 @@ static int DxCreateVideoDecoder(vlc_va_t *va, int codec_id,
return VLC_EGENERIC;
}
msg_Dbg(va, "IDirectXVideoAccelerationService_CreateSurface succeed with %d surfaces (%dx%d)",
surface_count, sys->va_pool.surface_width, sys->va_pool.surface_height);
surface_count, fmt->i_width, fmt->i_height);
IDirect3DSurface9 *tstCrash;
hr = IDirectXVideoDecoderService_CreateSurface(sys->d3ddec,
sys->va_pool.surface_width,
sys->va_pool.surface_height,
fmt->i_width,
fmt->i_width,
0,
p_sys->render,
D3DPOOL_DEFAULT,
......
......@@ -36,8 +36,6 @@
typedef struct
{
int codec_id;
int width;
int height;
/* */
unsigned surface_count;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment