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>2016-03-12 13:07:42 +0300
committerHendrik Leppkes <h.leppkes@gmail.com>2016-03-12 13:07:42 +0300
commit5ae687357e0fb58ba516fa0a2055fbe196315c27 (patch)
tree4dbf5443876bcde58818d1cfa42d00a3a9cab71a /decoder
parent1e0c955e6d85f4612443d189cdae15d1feebef88 (diff)
Properly signal doubled fps in initial media type when using w3fdif
Diffstat (limited to 'decoder')
-rw-r--r--decoder/LAVVideo/LAVVideo.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/decoder/LAVVideo/LAVVideo.cpp b/decoder/LAVVideo/LAVVideo.cpp
index 5c5d704e..0fd77b73 100644
--- a/decoder/LAVVideo/LAVVideo.cpp
+++ b/decoder/LAVVideo/LAVVideo.cpp
@@ -542,13 +542,17 @@ HRESULT CLAVVideo::GetMediaType(int iPosition, CMediaType *pMediaType)
CMediaType &mtIn = m_pInput->CurrentMediaType();
BITMAPINFOHEADER *pBIH = nullptr;
- REFERENCE_TIME rtAvgTime;
+ REFERENCE_TIME rtAvgTime = 0;
DWORD dwAspectX = 0, dwAspectY = 0;
videoFormatTypeHandler(mtIn.Format(), mtIn.FormatType(), &pBIH, &rtAvgTime, &dwAspectX, &dwAspectY);
// Adjust for deinterlacing
- if (m_Decoder.IsInterlaced() && m_settings.SWDeintMode != SWDeintMode_None && m_settings.SWDeintOutput == DeintOutput_FramePerField && !(m_settings.DeintMode == DeintMode_Disable))
- rtAvgTime /= 2;
+ if (m_Decoder.IsInterlaced() && m_settings.DeintMode != DeintMode_Disable) {
+ BOOL bFramePerField = (m_settings.SWDeintMode == SWDeintMode_YADIF && m_settings.SWDeintOutput == DeintOutput_FramePerField)
+ || m_settings.SWDeintMode == SWDeintMode_W3FDIF_Simple || m_settings.SWDeintMode == SWDeintMode_W3FDIF_Complex;
+ if (bFramePerField)
+ rtAvgTime /= 2;
+ }
m_PixFmtConverter.GetMediaType(pMediaType, index, pBIH->biWidth, pBIH->biHeight, dwAspectX, dwAspectY, rtAvgTime, IsInterlaced(), bVIH1);