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>2011-09-17 23:30:45 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2011-09-17 23:30:45 +0400
commit9da615c8c2f3c633d2bec8fd41f156c7d025a30a (patch)
treed0c03b9229a08b0550f48f1614271a3a1fecb5c8 /decoder
parent3e50e1a292005dc692a3e41e08210c43bd07852a (diff)
Support negative heights in stride fallback calculations.
Diffstat (limited to 'decoder')
-rw-r--r--decoder/LAVVideo/LAVVideo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/decoder/LAVVideo/LAVVideo.cpp b/decoder/LAVVideo/LAVVideo.cpp
index 9937a9ed..3bc433bf 100644
--- a/decoder/LAVVideo/LAVVideo.cpp
+++ b/decoder/LAVVideo/LAVVideo.cpp
@@ -528,7 +528,7 @@ HRESULT CLAVVideo::ReconnectOutput(int width, int height, AVRational ar, DXVA2_E
DeleteMediaType(pmt);
} else { // No Stride Request? We're ok with that, too!
long size = pOut->GetSize();
- pBIH->biWidth = size / pBIH->biHeight * 8 / pBIH->biBitCount;
+ pBIH->biWidth = size / abs(pBIH->biHeight) * 8 / pBIH->biBitCount;
m_bSendMediaType = TRUE;
DbgLog((LOG_TRACE, 10, L"-> We did not get a stride request, calculated stride: %d", pBIH->biWidth));
}