Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnderground78 <underground78@users.sourceforge.net>2013-01-25 01:37:37 +0400
committerUnderground78 <underground78@users.sourceforge.net>2013-01-25 02:06:21 +0400
commitfe65610d8367d1ff614d941d02f5e0710239e47f (patch)
tree0c56fcada5e963e19a304ba24b2a0057c0465aaa /src/filters/transform/MPCVideoDec
parent461a0656f8571d50ad595a9eb255f2e12083f42e (diff)
MPC Video Decoder: The "Read AR from stream" option was sometimes not working correctly.
Diffstat (limited to 'src/filters/transform/MPCVideoDec')
-rw-r--r--src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp
index 78973a5f7..940aa8e15 100644
--- a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp
+++ b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp
@@ -1242,7 +1242,20 @@ HRESULT CMPCVideoDecFilter::SetMediaType(PIN_DIRECTION direction, const CMediaTy
}
}
- return __super::SetMediaType(direction, pmt);
+ HRESULT hr = __super::SetMediaType(direction, pmt);
+
+ if (dir == PINDIR_INPUT) {
+ // Compute the expected Sample AR
+ m_sar.cx = m_arx * m_h;
+ m_sar.cy = m_ary * m_w;
+ int lnko = LNKO(m_sar.cx, m_sar.cy);
+ if (lnko > 1) {
+ m_sar.cx /= lnko;
+ m_sar.cy /= lnko;
+ }
+ }
+
+ return hr;
}
VIDEO_OUTPUT_FORMATS DXVAFormats[] = { // DXVA2