From e3a44184539067ff9be18a7d1458c6c349a6245a Mon Sep 17 00:00:00 2001
From: schmirl <schmirl>
Date: Mon, 15 Jan 2007 12:15:12 +0000
Subject: Compatibility for vdr < 1.3.38 (#169)

---
 client/device.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/client/device.c b/client/device.c
index c8506c3..a2e4580 100644
--- a/client/device.c
+++ b/client/device.c
@@ -1,5 +1,5 @@
 /*
- *  $Id: device.c,v 1.7 2006/09/14 10:43:10 schmirl Exp $
+ *  $Id: device.c,v 1.8 2007/01/15 12:15:12 schmirl Exp $
  */
  
 #include "client/device.h"
@@ -101,7 +101,19 @@ bool cStreamdevDevice::SetChannelDevice(const cChannel *Channel,
 			&& TRANSPONDER(Channel, m_Channel))
 		return true;
 
+#if VDRVERSNUM < 10338
+	DetachAll(pidHandles[ptAudio].pid);
+	DetachAll(pidHandles[ptVideo].pid);
+	DetachAll(pidHandles[ptPcr].pid);
+	DetachAll(pidHandles[ptTeletext].pid);
+	DelPid(pidHandles[ptAudio].pid);
+	DelPid(pidHandles[ptVideo].pid);
+	DelPid(pidHandles[ptPcr].pid, ptPcr);
+	DelPid(pidHandles[ptTeletext].pid);
+	DelPid(pidHandles[ptDolby].pid);
+#else
 	DetachAllReceivers();
+#endif
 	m_Channel = Channel;
 	bool r = ClientSocket.SetChannelDevice(m_Channel);
 	Dprintf("setchanneldevice r=%d\n", r);
-- 
cgit v1.2.3