From 5a173b0b212f21a7bc5f55487aef6da20511ee26 Mon Sep 17 00:00:00 2001 From: Frank Schmirler Date: Mon, 23 Jun 2014 23:27:10 +0200 Subject: No need for Detach/Attach in SwitchDevice as it is only called when detached. --- server/livestreamer.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'server') diff --git a/server/livestreamer.c b/server/livestreamer.c index 3487a6a..dcd9e7d 100644 --- a/server/livestreamer.c +++ b/server/livestreamer.c @@ -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)) { -- cgit v1.2.3