diff --git a/mythtv/libs/libmythtv/mythvideoout.cpp b/mythtv/libs/libmythtv/mythvideoout.cpp index 79c66687209..444e127255b 100644 --- a/mythtv/libs/libmythtv/mythvideoout.cpp +++ b/mythtv/libs/libmythtv/mythvideoout.cpp @@ -383,13 +383,22 @@ MythDeintType MythVideoOutput::ParseDeinterlacer(const QString& Deinterlacer) void MythVideoOutput::SetDeinterlacing(bool Enable, bool DoubleRate, MythDeintType Force /*=DEINT_NONE*/) { + + if (!Enable) { + m_deinterlacing = false; + m_deinterlacing2X = false; + m_forcedDeinterlacer = DEINT_NONE; m_videoBuffers.SetDeinterlacing(DEINT_NONE, DEINT_NONE, m_videoCodecID); LOG(VB_PLAYBACK, LOG_INFO, LOC + "Disabled all deinterlacing"); return; } + m_deinterlacing = Enable; + m_deinterlacing2X = DoubleRate; + m_forcedDeinterlacer = Force; + MythDeintType singlerate = DEINT_NONE; MythDeintType doublerate = DEINT_NONE; if (DEINT_NONE != Force) @@ -432,6 +441,8 @@ bool MythVideoOutput::InputChanged(const QSize& VideoDim, const QSize& VideoDisp m_dbDisplayProfile->SetInput(GetVideoDispDim(), 0 ,codecName); m_videoCodecID = CodecID; DiscardFrames(true, true); + // Update deinterlacers for any input change + SetDeinterlacing(m_deinterlacing, m_deinterlacing2X, m_forcedDeinterlacer); return true; } diff --git a/mythtv/libs/libmythtv/mythvideoout.h b/mythtv/libs/libmythtv/mythvideoout.h index 30642016e39..cb8c31c9552 100644 --- a/mythtv/libs/libmythtv/mythvideoout.h +++ b/mythtv/libs/libmythtv/mythvideoout.h @@ -136,6 +136,9 @@ class MythVideoOutput : public MythVideoBounds MythAVCopy m_copyFrame; MythDeinterlacer m_deinterlacer; VideoFrameTypeVec* m_renderFrameTypes { &s_defaultFrameTypes }; + bool m_deinterlacing { false }; + bool m_deinterlacing2X { false }; + MythDeintType m_forcedDeinterlacer { DEINT_NONE }; }; #endif // MYTH_VIDEOOUT_H_ diff --git a/mythtv/libs/libmythtv/mythvideooutgpu.cpp b/mythtv/libs/libmythtv/mythvideooutgpu.cpp index 44e714a92af..a15b3a2ec38 100644 --- a/mythtv/libs/libmythtv/mythvideooutgpu.cpp +++ b/mythtv/libs/libmythtv/mythvideooutgpu.cpp @@ -325,7 +325,6 @@ bool MythVideoOutputGPU::ProcessInputChange() codecName = codec->name; if (m_dbDisplayProfile) m_dbDisplayProfile->SetInput(GetVideoDispDim(), 0 , codecName); - bool ok = Init(m_newVideoDim, m_newVideoDispDim, m_newAspect, GetRawWindowRect(), m_newCodecId); m_newCodecId = kCodec_NONE; m_newVideoDim = QSize(); @@ -336,6 +335,9 @@ bool MythVideoOutputGPU::ProcessInputChange() if (wasembedding && ok) EmbedInWidget(oldrect); + // Update deinterlacers for any input change + SetDeinterlacing(m_deinterlacing, m_deinterlacing2X, m_forcedDeinterlacer); + if (!ok) return false; } diff --git a/mythtv/libs/libmythtv/mythvideooutnull.cpp b/mythtv/libs/libmythtv/mythvideooutnull.cpp index 3d88ec2d346..cd1f7e74db0 100644 --- a/mythtv/libs/libmythtv/mythvideooutnull.cpp +++ b/mythtv/libs/libmythtv/mythvideooutnull.cpp @@ -199,6 +199,10 @@ void MythVideoOutputNull::SetDeinterlacing(bool Enable, bool DoubleRate, MythDei MythVideoOutput::SetDeinterlacing(Enable, DoubleRate, Force); return; } + + m_deinterlacing = false; + m_deinterlacing2X = false; + m_forcedDeinterlacer = DEINT_NONE; m_videoBuffers.SetDeinterlacing(DEINT_NONE, DEINT_NONE, m_videoCodecID); }