aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-10-30 00:14:17 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-10-30 00:14:17 +0000
commit978b06eb1a31471ebda868ddf526cb40a38fe652 (patch)
tree1b76dfe3033bd301dec3d9daff52c33415127503 /lib/dvb
parent0c59a4279f93f08fe95fca5f2e55f3e025f0cceb (diff)
downloadenigma2-978b06eb1a31471ebda868ddf526cb40a38fe652.tar.gz
enigma2-978b06eb1a31471ebda868ddf526cb40a38fe652.zip
small refcounting fixes, add private operator delete to iObject
Diffstat (limited to 'lib/dvb')
-rw-r--r--lib/dvb/dvbtime.cpp7
-rw-r--r--lib/dvb/dvbtime.h2
-rw-r--r--lib/dvb/pmt.cpp2
-rw-r--r--lib/dvb/pmt.h2
4 files changed, 3 insertions, 10 deletions
diff --git a/lib/dvb/dvbtime.cpp b/lib/dvb/dvbtime.cpp
index 4c5911c9..83ca3355 100644
--- a/lib/dvb/dvbtime.cpp
+++ b/lib/dvb/dvbtime.cpp
@@ -169,8 +169,6 @@ eDVBLocalTimeHandler::eDVBLocalTimeHandler()
eDVBLocalTimeHandler::~eDVBLocalTimeHandler()
{
instance=0;
- for (std::map<iDVBChannel*, channel_data>::iterator it=m_knownChannels.begin(); it != m_knownChannels.end(); ++it)
- delete it->second.tdt;
if (ready())
{
eDebug("set RTC to previous valid time");
@@ -396,10 +394,8 @@ void eDVBLocalTimeHandler::updateTime( time_t tp_time, eDVBChannel *chan, int up
m_knownChannels.find(chan);
if ( it != m_knownChannels.end() )
{
- TDT *prev_tdt = it->second.tdt;
- it->second.tdt = new TDT(chan, prev_tdt->getUpdateCount());
+ it->second.tdt = new TDT(chan, it->second.tdt->getUpdateCount());
it->second.tdt->startTimer(60*60*1000); // restart TDT for this transponder in 60min
- delete prev_tdt;
}
}
}
@@ -437,7 +433,6 @@ void eDVBLocalTimeHandler::DVBChannelStateChanged(iDVBChannel *chan)
break;
case iDVBChannel::state_release:
eDebug("[eDVBLocalTimerHandler] remove channel %p", chan);
- delete it->second.tdt;
m_knownChannels.erase(it);
break;
default: // ignore all other events
diff --git a/lib/dvb/dvbtime.h b/lib/dvb/dvbtime.h
index efb85962..f403ffd4 100644
--- a/lib/dvb/dvbtime.h
+++ b/lib/dvb/dvbtime.h
@@ -49,7 +49,7 @@ class eDVBLocalTimeHandler: public Object
DECLARE_REF(eDVBLocalTimeHandler);
struct channel_data
{
- TDT *tdt;
+ ePtr<TDT> tdt;
ePtr<eDVBChannel> channel;
ePtr<eConnection> m_stateChangedConn;
int m_prevChannelState;
diff --git a/lib/dvb/pmt.cpp b/lib/dvb/pmt.cpp
index 80fbcab3..6082bf4a 100644
--- a/lib/dvb/pmt.cpp
+++ b/lib/dvb/pmt.cpp
@@ -605,7 +605,6 @@ int eDVBServicePMTHandler::tune(eServiceReferenceDVB &ref, int use_decode_demux,
if (ref.path.empty())
{
- delete m_dvb_scan;
m_dvb_scan = new eDVBScan(m_channel, true, false);
m_dvb_scan->connectEvent(slot(*this, &eDVBServicePMTHandler::SDTScanEvent), m_scan_event_connection);
}
@@ -631,7 +630,6 @@ int eDVBServicePMTHandler::tune(eServiceReferenceDVB &ref, int use_decode_demux,
void eDVBServicePMTHandler::free()
{
m_dvb_scan = 0;
- delete m_dvb_scan;
if (m_ca_servicePtr)
{
diff --git a/lib/dvb/pmt.h b/lib/dvb/pmt.h
index d3a7faa7..107b071a 100644
--- a/lib/dvb/pmt.h
+++ b/lib/dvb/pmt.h
@@ -76,7 +76,7 @@ class eDVBServicePMTHandler: public Object
int m_last_channel_state;
eDVBCAService *m_ca_servicePtr;
- eDVBScan *m_dvb_scan; // for sdt scan
+ ePtr<eDVBScan> m_dvb_scan; // for sdt scan
eAUTable<eTable<ProgramMapSection> > m_PMT;
eAUTable<eTable<ProgramAssociationSection> > m_PAT;