Skip to content

Commit

Permalink
dxva2n/d3d11: limit number of buffers for vp9 to 32 to avoid decode i…
Browse files Browse the repository at this point in the history
…ssues
  • Loading branch information
Nevcairiel committed Oct 20, 2017
1 parent 12810c9 commit be76649
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions decoder/LAVVideo/decoders/d3d11va.cpp
Expand Up @@ -574,8 +574,8 @@ STDMETHODIMP_(long) CDecD3D11::GetBufferCount(long *pMaxBuffers)
// cap at 127, because it needs to fit into the 7-bit DXVA structs
*pMaxBuffers = 127;

// VC-1 decoding has stricter requirements (decoding flickers otherwise)
if (m_nCodecId == AV_CODEC_ID_VC1)
// VC-1 and VP9 decoding has stricter requirements (decoding flickers otherwise)
if (m_nCodecId == AV_CODEC_ID_VC1 || m_nCodecId == AV_CODEC_ID_VP9)
*pMaxBuffers = 32;
}

Expand Down
4 changes: 2 additions & 2 deletions decoder/LAVVideo/decoders/dxva2dec.cpp
Expand Up @@ -999,8 +999,8 @@ STDMETHODIMP_(long) CDecDXVA2::GetBufferCount(long *pMaxBuffers)
// cap at 127, because it needs to fit into the 7-bit DXVA structs
*pMaxBuffers = 127;

// VC-1 decoding has stricter requirements (decoding flickers otherwise)
if (m_nCodecId == AV_CODEC_ID_VC1)
// VC-1 and VP9 decoding has stricter requirements (decoding flickers otherwise)
if (m_nCodecId == AV_CODEC_ID_VC1 || m_nCodecId == AV_CODEC_ID_VP9)
*pMaxBuffers = 32;
}

Expand Down

0 comments on commit be76649

Please sign in to comment.