diff options
Diffstat (limited to 'src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp')
-rw-r--r-- | src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp index 1c814f612..5e24f8dbc 100644 --- a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp +++ b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp @@ -2363,15 +2363,14 @@ HRESULT CMPCVideoDecFilter::CreateDXVA2Decoder(UINT nNumRenderTargets, IDirect3D pDecoderRenderTargets, nNumRenderTargets, &pDirectXVideoDec);
if (SUCCEEDED(hr)) {
- // need recreate dxva decoder after "stop" on Intel HD Graphics
- SAFE_DELETE (m_pDXVADecoder);
- m_pDXVADecoder = CDXVADecoder::CreateDecoder(this, pDirectXVideoDec, &m_DXVADecoderGUID, GetPicEntryNumber(), &m_DXVA2Config);
- if (m_pDXVADecoder) {
- m_pDXVADecoder->SetExtraData((BYTE*)m_pAVCtx->extradata, m_pAVCtx->extradata_size);
- m_pDXVADecoder->SetDirectXVideoDec(pDirectXVideoDec);
- } else {
- hr = E_FAIL;
+ if (!m_pDXVADecoder) {
+ m_pDXVADecoder = CDXVADecoder::CreateDecoder(this, pDirectXVideoDec, &m_DXVADecoderGUID, GetPicEntryNumber(), &m_DXVA2Config);
+ if (m_pDXVADecoder) {
+ m_pDXVADecoder->SetExtraData((BYTE*)m_pAVCtx->extradata, m_pAVCtx->extradata_size);
+ }
}
+
+ m_pDXVADecoder->SetDirectXVideoDec(pDirectXVideoDec);
}
return hr;
|