aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-05-24 13:17:36 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-05-24 13:17:36 +0000
commit4f58fdeaa55c472f4cbc69e57c43e9095360008b (patch)
treee93438cf0728445acc6f30b308244556e7704a63 /lib
parent75032cb4a7021bdf14e95b34631cef5e05ced4c1 (diff)
downloadenigma2-4f58fdeaa55c472f4cbc69e57c43e9095360008b.tar.gz
enigma2-4f58fdeaa55c472f4cbc69e57c43e9095360008b.zip
fix segfault on fast zapping (faster then a pmt is received)
Diffstat (limited to 'lib')
-rw-r--r--lib/dvb/pmt.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/dvb/pmt.cpp b/lib/dvb/pmt.cpp
index 16f93681..5301df9b 100644
--- a/lib/dvb/pmt.cpp
+++ b/lib/dvb/pmt.cpp
@@ -449,7 +449,8 @@ int eDVBServicePMTHandler::tune(eServiceReferenceDVB &ref, int use_decode_demux,
ref.getChannelID(chid);
res = m_resourceManager->allocateChannel(chid, m_channel);
eDebug("allocate Channel: res %d", res);
- eDVBCIInterfaces::getInstance()->addPMTHandler(this);
+ if (!res)
+ eDVBCIInterfaces::getInstance()->addPMTHandler(this);
} else
{
eDVBMetaParser parser;
@@ -537,10 +538,12 @@ void eDVBServicePMTHandler::free()
ePtr<eTable<ProgramMapSection> > ptr;
m_PMT.getCurrent(ptr);
eDVBCAService::unregister_service(m_reference, demuxes, ptr);
- eDVBCIInterfaces::getInstance()->removePMTHandler(this);
m_ca_servicePtr = 0;
}
+ if (m_channel)
+ eDVBCIInterfaces::getInstance()->removePMTHandler(this);
+
if (m_pvr_channel)
{
m_pvr_channel->stopFile();