diff options
Diffstat (limited to 'decoder')
-rw-r--r-- | decoder/LAVVideo/decoders/dxva2dec.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/decoder/LAVVideo/decoders/dxva2dec.cpp b/decoder/LAVVideo/decoders/dxva2dec.cpp index 6183313a..758e492b 100644 --- a/decoder/LAVVideo/decoders/dxva2dec.cpp +++ b/decoder/LAVVideo/decoders/dxva2dec.cpp @@ -691,6 +691,9 @@ done: HRESULT CDecDXVA2::CheckHWCompatConditions(GUID decoderGuid) { + if (m_dwSurfaceWidth == 0 || m_dwSurfaceHeight == 0) + return E_UNEXPECTED; + int width_mbs = m_dwSurfaceWidth / 16; int height_mbs = m_dwSurfaceHeight / 16; int max_ref_frames_dpb41 = min(11, 32768 / (width_mbs * height_mbs)); |