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:
authorHendrik Leppkes <h.leppkes@gmail.com>2013-04-19 17:14:51 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2013-04-19 17:14:51 +0400
commit8017386acdcc833d536913ccea0e09d933607044 (patch)
tree64b23d014902686bff928e8250047951adc647a1 /decoder
parenta154077158339a8287a6bf15107ba6bb082172b4 (diff)
dxva2: fix mpeg2/vc1 image flushing and track used frames after a flush
Diffstat (limited to 'decoder')
-rw-r--r--decoder/LAVVideo/decoders/dxva2dec.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/decoder/LAVVideo/decoders/dxva2dec.cpp b/decoder/LAVVideo/decoders/dxva2dec.cpp
index 940bc15f..34eb10db 100644
--- a/decoder/LAVVideo/decoders/dxva2dec.cpp
+++ b/decoder/LAVVideo/decoders/dxva2dec.cpp
@@ -1129,10 +1129,15 @@ STDMETHODIMP CDecDXVA2::Flush()
{
CDecAvcodec::Flush();
+ int used = 0;
for (int i = 0; i < m_NumSurfaces; i++) {
d3d_surface_t *s = &m_pSurfaces[i];
- s->used = false;
- //s->age = 0;
+ if (s->used) {
+ used++;
+ }
+ }
+ if (used > 0) {
+ DbgLog((LOG_TRACE, 10, L"WARNING! %d frames still in use after flush", used));
}
FlushDisplayQueue(FALSE);