From patchwork Wed May 18 17:41:45 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ville_Skytt=C3=A4?= X-Patchwork-Id: 11886 Received: from smtp2.pp.htv.fi ([213.243.153.35]) by www.linuxtv.org with esmtp (Exim 4.34) id 1DYSWS-0001mW-ON for vdr@linuxtv.org; Wed, 18 May 2005 19:39:56 +0200 Received: from cs78131082.pp.htv.fi (cs78131082.pp.htv.fi [62.78.131.82]) by smtp2.pp.htv.fi (Postfix) with ESMTP id 7BB51296B7A for ; Wed, 18 May 2005 20:39:55 +0300 (EEST) From: Ville =?ISO-8859-1?Q?Skytt=E4?= To: vdr@linuxtv.org Date: Wed, 18 May 2005 20:41:45 +0300 Message-Id: <1116438105.22482.9.camel@bobcat.mine.nu> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-4) Subject: [vdr] Fix for DVB subtitles crash at exit (with plugin primary device) X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2005 17:39:56 -0000 Status: O X-Status: X-Keywords: X-UID: 2329 Here's a patch for the subtitles plugin that fixes a crash when shutting down VDR. Patch already sent upstream. The crash can probably occur only when the primary device is implemented by a plugin which has already been shut down before the DVB subtitles plugin. --- sync.c~ 2005-02-15 12:08:01.000000000 +0200 +++ sync.c 2005-05-16 20:12:07.000000000 +0300 @@ -24,7 +24,9 @@ int64_t cStcSynchronizer::GetSTC(bool fix) { - int64_t stc = cDevice::PrimaryDevice()->GetSTC(); + int64_t stc = -1; + if (cDevice *pd = cDevice::PrimaryDevice()) + stc = pd->GetSTC(); // add the 33rd bit if required if (fix)