From patchwork Sat Aug 9 20:09:26 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anssi Hannula X-Patchwork-Id: 12665 Received: from mta-out.inet.fi ([195.156.147.13] helo=jenni2.inet.fi) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1KRukb-0005UI-BG for vdr@linuxtv.org; Sat, 09 Aug 2008 22:09:22 +0200 Received: from mail.onse.fi (84.250.84.250) by jenni2.inet.fi (8.5.014) id 489066C50067B004 for vdr@linuxtv.org; Sat, 9 Aug 2008 23:09:17 +0300 Received: from gamma.onse.fi (gamma [10.0.0.7]) by mail.onse.fi (Postfix) with ESMTP id C391110DE090 for ; Sat, 9 Aug 2008 23:09:03 +0300 (EEST) Message-ID: <489DF976.2030903@gmail.com> Date: Sat, 09 Aug 2008 23:09:26 +0300 From: Anssi Hannula User-Agent: Thunderbird 2.0.0.14 (X11/20080504) MIME-Version: 1.0 To: VDR Mailing List X-LSpam-Score: -2.4 (--) X-LSpam-Report: No, score=-2.4 required=5.0 tests=AWL=0.233, BAYES_00=-2.599 autolearn=ham Subject: [vdr] Old subtitles not stopped when switching primary device X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Aug 2008 20:09:22 -0000 Status: O X-Status: X-Keywords: X-UID: 17466 Hi! When switching the primary device, old subtitles are not removed, and user may get the subtitles of wrong channel or two sets of subtitles at the same time. Attached is a hacky patch that doesn't work if MakePrimaryDevice() is implemented by a plugin device. Unfortunately I haven't currently got the time to make a proper patch, but this should give you an idea on the problem. Index: vdr-1.6.0-primdev/device.c =================================================================== --- vdr-1.6.0-primdev/device.c +++ vdr-1.6.0-primdev/device.c 2008-05-23 22:17:05.000000000 +0300 @@ -313,6 +313,10 @@ void cDevice::MakePrimaryDevice(bool On) { + if (On == false) { + DELETENULL(liveSubtitle); + DELETENULL(dvbSubtitleConverter); + } } bool cDevice::SetPrimaryDevice(int n) Index: vdr-1.6.0-primdev/dvbdevice.c =================================================================== --- vdr-1.6.0-primdev/dvbdevice.c +++ vdr-1.6.0-primdev/dvbdevice.c 2008-05-23 22:18:03.000000000 +0300 @@ -486,6 +486,7 @@ { if (On && HasDecoder()) new cDvbOsdProvider(fd_osd); + cDevice::MakePrimaryDevice(On); } bool cDvbDevice::HasDecoder(void) const