Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'decoder')
-rw-r--r--decoder/LAVVideo/decoders/dxva2dec.cpp3
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));