diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2014-01-21 11:12:01 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2014-01-21 11:12:01 +0100 |
commit | 838566ea418c42a7be96417657a5bee70dae2c22 (patch) | |
tree | 79eaa5c2e4d4ad69defcbf5623315bda665249b8 /device.c | |
parent | 6e2f0f695f0c537ddeb0c61b51e298caf29bcbb3 (diff) | |
download | vdr-838566ea418c42a7be96417657a5bee70dae2c22.tar.gz vdr-838566ea418c42a7be96417657a5bee70dae2c22.tar.bz2 |
Fixed a deadlock
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |