No need for Detach/Attach in SwitchDevice as it is only called when detached.

This commit is contained in:
Frank Schmirler 2014-06-23 23:27:10 +02:00
parent 3e9e7f7de6
commit 5a173b0b21
1 changed files with 0 additions and 5 deletions

View File

@ -635,13 +635,8 @@ bool cStreamdevLiveStreamer::UsedByLiveTV(cDevice *device)
cDevice *cStreamdevLiveStreamer::SwitchDevice(const cChannel *Channel, int Priority)
{
// turn off the streams of this connection
Detach();
cDevice *device = cDevice::GetDevice(Channel, Priority, false);
if (!device) {
// can't switch - continue the current stream
Attach();
dsyslog("streamdev: GetDevice failed for channel %d (%s) at priority %d (PrimaryDevice=%d, ActualDevice=%d)", Channel->Number(), Channel->Name(), Priority, cDevice::PrimaryDevice()->CardIndex(), cDevice::ActualDevice()->CardIndex());
}
else if (!device->IsTunedToTransponder(Channel) && UsedByLiveTV(device)) {