release cached channel when its no more used and a pvr channel request is pending
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 31 Mar 2006 14:47:40 +0000 (14:47 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 31 Mar 2006 14:47:40 +0000 (14:47 +0000)
lib/dvb/dvb.cpp

index ba76a40..55aa6ea 100644 (file)
@@ -432,9 +432,16 @@ RESULT eDVBResourceManager::allocatePVRChannel(eUsePtr<iDVBPVRChannel> &channel)
 {
        ePtr<eDVBAllocatedDemux> demux;
 
+       if (m_cached_channel && m_releaseCachedChannelTimer.isActive())
+       {
+               m_cached_channel_state_changed_conn.disconnect();
+               m_cached_channel=0;
+               m_releaseCachedChannelTimer.stop();
+       }
+
        eDVBChannel *ch;
        ch = new eDVBChannel(this, 0);
-       
+
        channel = ch;
        return 0;
 }