diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2012-12-14 20:47:53 +0400 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2012-12-14 20:47:53 +0400 |
commit | 627a761584921148f33bdded63aedb9aadcf8308 (patch) | |
tree | 6a44f4f467c02e7ae4411944bb8839c5d295c8ce | |
parent | bfcd6db4a257b62a44be5867c953af6d64fa9914 (diff) |
Calculate the required Stride for the Overlay Mixer.
Based on a patch by clsid.
-rw-r--r-- | decoder/LAVVideo/LAVVideo.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/decoder/LAVVideo/LAVVideo.cpp b/decoder/LAVVideo/LAVVideo.cpp index d280ca45..ebbe5af4 100644 --- a/decoder/LAVVideo/LAVVideo.cpp +++ b/decoder/LAVVideo/LAVVideo.cpp @@ -1028,8 +1028,12 @@ HRESULT CLAVVideo::ReconnectOutput(int width, int height, AVRational ar, DXVA2_E #endif DeleteMediaType(pmt); } else { // No Stride Request? We're ok with that, too! - //long size = pOut->GetSize(); - //pBIH->biWidth = size / abs(pBIH->biHeight) * 8 / pBIH->biBitCount; + // The overlay mixer doesn't ask for a stride, but it needs one anyway + // It'll provide a buffer just in the right size, so we can calculate this here. + if (m_bOverlayMixer) { + long size = pOut->GetSize(); + pBIH->biWidth = size / abs(pBIH->biHeight) * 8 / pBIH->biBitCount; + } DbgLog((LOG_TRACE, 10, L"-> We did not get a stride request, using width %d for stride", pBIH->biWidth)); m_bSendMediaType = TRUE; m_pOutput->SetMediaType(&mt); |