From 47d0636624ec2c9910e0d3e7254341af67549678 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Mon, 27 Apr 2015 17:15:25 +0100 Subject: [PATCH] Fix load file and reload button --- app/VideoSubWindow.cpp | 10 +++++----- lib/PlaYUVerFrame.cpp | 2 ++ lib/PlaYUVerFrameStats.cpp | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/VideoSubWindow.cpp b/app/VideoSubWindow.cpp index 2eacb09..bab4daa 100644 --- a/app/VideoSubWindow.cpp +++ b/app/VideoSubWindow.cpp @@ -157,11 +157,11 @@ Bool VideoSubWindow::loadFile( QString cFilename, Bool bForceDialog ) { m_pCurrStream = new PlaYUVerStream; } - else - { - delete m_pCurrStream; - m_pCurrStream = new PlaYUVerStream; - } +// else +// { +// delete m_pCurrStream; +// m_pCurrStream = new PlaYUVerStream; +// } if( guessFormat( cFilename, Width, Height, InputFormat, FrameRate ) || bForceDialog ) { diff --git a/lib/PlaYUVerFrame.cpp b/lib/PlaYUVerFrame.cpp index ef90a67..15cbcb2 100644 --- a/lib/PlaYUVerFrame.cpp +++ b/lib/PlaYUVerFrame.cpp @@ -138,9 +138,11 @@ PlaYUVerFrame::~PlaYUVerFrame() { if( m_pppcInputPel ) freeMem3ImageComponents( m_pppcInputPel ); + m_pppcInputPel = NULL; if( m_pcARGB32 ) freeMem1D( m_pcARGB32 ); + m_pcARGB32 = NULL; closePixfc(); } diff --git a/lib/PlaYUVerFrameStats.cpp b/lib/PlaYUVerFrameStats.cpp index ab455ef..76b641a 100644 --- a/lib/PlaYUVerFrameStats.cpp +++ b/lib/PlaYUVerFrameStats.cpp @@ -45,7 +45,7 @@ PlaYUVerFrameStats::~PlaYUVerFrameStats() { if( m_puiHistogram ) freeMem1D( m_puiHistogram ); - + m_puiHistogram = NULL; } // statistics