mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
CScanTs: fix progressbar and rcinput memleaks
Origin commit data
------------------
Branch: ni/coolstream
Commit: 44a44d6673
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-10-31 (Wed, 31 Oct 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -72,8 +72,8 @@ CScanTs::CScanTs()
|
|||||||
total = done = 0;
|
total = done = 0;
|
||||||
freqready = 0;
|
freqready = 0;
|
||||||
|
|
||||||
sigscale = new CProgressBar(true, BAR_WIDTH, BAR_HEIGHT);
|
sigscale = NULL;
|
||||||
snrscale = new CProgressBar(true, BAR_WIDTH, BAR_HEIGHT);
|
snrscale = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScanTs::prev_next_TP( bool up)
|
void CScanTs::prev_next_TP( bool up)
|
||||||
@@ -195,13 +195,15 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
|||||||
ypos_radar = y + hheight + (mheight >> 1);
|
ypos_radar = y + hheight + (mheight >> 1);
|
||||||
xpos1 = x + 10;
|
xpos1 = x + 10;
|
||||||
|
|
||||||
sigscale->reset();
|
|
||||||
snrscale->reset();
|
|
||||||
lastsig = lastsnr = -1;
|
|
||||||
|
|
||||||
if (!frameBuffer->getActive())
|
if (!frameBuffer->getActive())
|
||||||
return menu_return::RETURN_EXIT_ALL;
|
return menu_return::RETURN_EXIT_ALL;
|
||||||
|
|
||||||
|
if (!sigscale)
|
||||||
|
sigscale = new CProgressBar(true, BAR_WIDTH, BAR_HEIGHT);
|
||||||
|
if (!snrscale)
|
||||||
|
snrscale = new CProgressBar(true, BAR_WIDTH, BAR_HEIGHT);
|
||||||
|
lastsig = lastsnr = -1;
|
||||||
|
|
||||||
CRecordManager::getInstance()->StopAutoRecord();
|
CRecordManager::getInstance()->StopAutoRecord();
|
||||||
g_Zapit->stopPlayBack();
|
g_Zapit->stopPlayBack();
|
||||||
|
|
||||||
@@ -356,6 +358,10 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
|||||||
}
|
}
|
||||||
|
|
||||||
hide();
|
hide();
|
||||||
|
delete sigscale;
|
||||||
|
sigscale = NULL;
|
||||||
|
delete snrscale;
|
||||||
|
snrscale = NULL;
|
||||||
|
|
||||||
CZapit::getInstance()->scanPids(scan_pids);
|
CZapit::getInstance()->scanPids(scan_pids);
|
||||||
videoDecoder->StopPicture();
|
videoDecoder->StopPicture();
|
||||||
@@ -459,10 +465,10 @@ neutrino_msg_t CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data)
|
|||||||
CVolume::getInstance()->setVolume(msg, true, true);
|
CVolume::getInstance()->setVolume(msg, true, true);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000))
|
|
||||||
delete (unsigned char*) data;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000))
|
||||||
|
delete[] (unsigned char*) data;
|
||||||
/* almost all messages paint something, so blit here */
|
/* almost all messages paint something, so blit here */
|
||||||
frameBuffer->blit();
|
frameBuffer->blit();
|
||||||
return msg;
|
return msg;
|
||||||
|
Reference in New Issue
Block a user