From f8d0f773070e8ac498ff408d35cf9e5daa8f3aa3 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Tue, 17 Jan 2012 15:37:52 +0100 Subject: [PATCH] Fixed asserting there is a live programme if the primary device is bonded with a device that starts a recording on a different band --- HISTORY | 4 +++- device.c | 10 +++++++++- device.h | 5 ++++- dvbdevice.c | 4 +++- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/HISTORY b/HISTORY index 6cf64901..0deec00c 100644 --- a/HISTORY +++ b/HISTORY @@ -6836,7 +6836,7 @@ Video Disk Recorder Revision History - Fixed frozen live view with device bonding in case the bonded master is used for live viewing (reported by Uwe Scheffler). -2012-01-16: Version 1.7.24 +2012-01-17: Version 1.7.24 - Updated the Italian OSD texts (thanks to Diego Pierotto). - Revoked "Fixed handling symbolic links in cRecordings::ScanVideoDir()". @@ -6845,3 +6845,5 @@ Video Disk Recorder Revision History - Fixed a high load in case a transponder can't be received. - Improved the way DVB_API_VERSION is checked. - Updated the Finnish OSD texts (thanks to Rolf Ahrenberg). +- Fixed asserting there is a live programme if the primary device is bonded with + a device that starts a recording on a different band. diff --git a/device.c b/device.c index 0bab66cd..be59ed5f 100644 --- a/device.c +++ b/device.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 2.44 2011/10/16 14:36:43 kls Exp $ + * $Id: device.c 2.45 2012/01/17 15:28:57 kls Exp $ */ #include "device.h" @@ -531,6 +531,14 @@ bool cDevice::SetPid(cPidHandle *Handle, int Type, bool On) return false; } +void cDevice::DelLivePids(void) +{ + for (int i = ptAudio; i < ptOther; i++) { + if (pidHandles[i].pid) + DelPid(pidHandles[i].pid, ePidType(i)); + } +} + void cDevice::StartSectionHandler(void) { if (!sectionHandler) { diff --git a/device.h b/device.h index e2ff8126..a0be67d0 100644 --- a/device.h +++ b/device.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.h 2.30 2011/12/04 13:38:17 kls Exp $ + * $Id: device.h 2.31 2012/01/17 15:13:10 kls Exp $ */ #ifndef __DEVICE_H @@ -354,6 +354,9 @@ protected: ///< Handle->used indicates how many receivers are using this PID. ///< Type indicates some special types of PIDs, which the device may ///< need to set in a specific way. +public: + void DelLivePids(void); + ///< Deletes the live viewing PIDs. // Section filter facilities diff --git a/dvbdevice.c b/dvbdevice.c index 7a6c7508..62f7c753 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 2.58 2012/01/16 12:52:01 kls Exp $ + * $Id: dvbdevice.c 2.59 2012/01/17 15:16:12 kls Exp $ */ #include "dvbdevice.h" @@ -502,6 +502,8 @@ void cDvbTuner::SetChannel(const cChannel *Channel) tunerStatus = tsIdle; ResetToneAndVoltage(); } + if (bondedTuner && device->IsPrimaryDevice()) + cDevice::PrimaryDevice()->DelLivePids(); // 'device' is const, so we must do it this way } bool cDvbTuner::Locked(int TimeoutMs)