From 838566ea418c42a7be96417657a5bee70dae2c22 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Tue, 21 Jan 2014 11:12:01 +0100 Subject: [PATCH] Fixed a deadlock --- device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/device.c b/device.c index 5b9e1ec6..9da5e7ff 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 3.10 2014/01/20 11:53:47 kls Exp $ + * $Id: device.c 3.11 2014/01/21 11:12:01 kls Exp $ */ #include "device.h" @@ -1579,7 +1579,6 @@ void cDevice::Action(void) while (Running()) { // Read data from the DVR device: uchar *b = NULL; - LOCK_THREAD; if (GetTSPacket(b)) { if (b) { int Pid = TsPid(b); @@ -1604,6 +1603,7 @@ void cDevice::Action(void) } } // Distribute the packet to all attached receivers: + Lock(); for (int i = 0; i < MAXRECEIVERS; i++) { if (receiver[i] && receiver[i]->WantsPid(Pid)) { if (DetachReceivers) { @@ -1616,6 +1616,7 @@ void cDevice::Action(void) ChannelCamRelations.SetDecrypt(receiver[i]->ChannelID(), CamSlotNumber); } } + Unlock(); } } else