diff options
author | Casimir666 <casimir666@users.sourceforge.net> | 2008-02-03 19:58:08 +0300 |
---|---|---|
committer | Casimir666 <casimir666@users.sourceforge.net> | 2008-02-03 19:58:08 +0300 |
commit | 8b20ecf7fa3cabb648a1b1b157b1c68fe2a9f500 (patch) | |
tree | 154e8ad1fca052dfcda66c2f6ffe31d92a801bb2 /src/filters/transform/mpcvideodec/DXVADecoder.cpp | |
parent | dcf821bf85a98d27780bffb3b0de6d6d47ccc673 (diff) |
FIXED : crash on exit
FIXED : 1080 video was displayed with a green band on top (XP only)
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@395 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/transform/mpcvideodec/DXVADecoder.cpp')
-rw-r--r-- | src/filters/transform/mpcvideodec/DXVADecoder.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/filters/transform/mpcvideodec/DXVADecoder.cpp b/src/filters/transform/mpcvideodec/DXVADecoder.cpp index 257c5e6f7..952b4c8a8 100644 --- a/src/filters/transform/mpcvideodec/DXVADecoder.cpp +++ b/src/filters/transform/mpcvideodec/DXVADecoder.cpp @@ -33,6 +33,7 @@ CDXVADecoder::CDXVADecoder (CMPCVideoDecFilter* pFilter, IAMVideoAccelerator* p m_nEngine = ENGINE_DXVA1;
m_pAMVideoAccelerator = pAMVideoAccelerator;
m_dwBufferIndex = 0;
+ m_nMaxWaiting = 3;
Init (pFilter, nMode, nPicEntryNumber);
}
@@ -472,7 +473,7 @@ int CDXVADecoder::FindOldestFrame() int nPos = -1;
// TODO : find better solution...
- if (m_nWaitingPics > 3)
+ if (m_nWaitingPics > m_nMaxWaiting)
{
for (int i=0; i<m_nPicEntryNumber; i++)
{
@@ -526,8 +527,6 @@ HRESULT CDXVADecoder::DisplayNextFrame() #endif
}
- m_nWaitingPics--;
-
m_pPictureStore[nPicIndex].bDisplayed = true;
if (!m_pPictureStore[nPicIndex].bRefPicture)
FreePictureSlot (nPicIndex);
@@ -578,4 +577,5 @@ void CDXVADecoder::FreePictureSlot (int nSurfaceIndex) m_pPictureStore[nSurfaceIndex].bInUse = false;
m_pPictureStore[nSurfaceIndex].bDisplayed = false;
m_pPictureStore[nSurfaceIndex].pSample = NULL;
+ m_nWaitingPics--;
}
|