From ae3ce79cf2f87b3755aa2a1c2ca03148adb1b1ae Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 10 Dec 2020 06:50:15 +0100 Subject: [PATCH] ATV demod: initialize m_tvScreenBuffer when setting m_registeredTVScreen. --- plugins/channelrx/demodatv/atvdemodsink.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/channelrx/demodatv/atvdemodsink.h b/plugins/channelrx/demodatv/atvdemodsink.h index 6bd487629..1621b59d8 100644 --- a/plugins/channelrx/demodatv/atvdemodsink.h +++ b/plugins/channelrx/demodatv/atvdemodsink.h @@ -45,7 +45,11 @@ public: virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end); void setScopeSink(BasebandSampleSink* scopeSink) { m_scopeSink = scopeSink; } - void setTVScreen(TVScreenAnalog *tvScreen) { m_registeredTVScreen = tvScreen; } //!< set by the GUI + void setTVScreen(TVScreenAnalog *tvScreen) //!< set by the GUI + { + m_registeredTVScreen = tvScreen; + m_tvScreenBuffer = m_registeredTVScreen->getBackBuffer(); + } double getMagSq() const { return m_magSqAverage; } //!< Beware this is scaled to 2^30 bool getBFOLocked(); void setVideoTabIndex(int videoTabIndex) { m_videoTabIndex = videoTabIndex; } @@ -312,4 +316,4 @@ private: } }; -#endif // INCLUDE_ATVDEMODSINK_H \ No newline at end of file +#endif // INCLUDE_ATVDEMODSINK_H