diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2011-09-17 23:30:45 +0400 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2011-09-17 23:30:45 +0400 |
commit | 9da615c8c2f3c633d2bec8fd41f156c7d025a30a (patch) | |
tree | d0c03b9229a08b0550f48f1614271a3a1fecb5c8 | |
parent | 3e50e1a292005dc692a3e41e08210c43bd07852a (diff) |
Support negative heights in stride fallback calculations.
-rw-r--r-- | decoder/LAVVideo/LAVVideo.cpp | 2 |
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)); } |