diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2020-06-12 09:28:44 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2020-06-12 09:28:44 +0200 |
commit | 8e1be83b56ee9570edce459a35e60201740f4779 (patch) | |
tree | 730c16223305476bd45c7ffe1855d4181704d066 | |
parent | 5cfa736ad08cb37cd60a09752cd7df997f2370f8 (diff) | |
download | vdr-8e1be83b56ee9570edce459a35e60201740f4779.tar.gz vdr-8e1be83b56ee9570edce459a35e60201740f4779.tar.bz2 |
Revised 'Fixed a possible deadlock when detaching a receiver from a device' from version 2.3.9, which sometimes caused a black screen when switching channels
-rw-r--r-- | CONTRIBUTORS | 3 | ||||
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | device.c | 13 |
3 files changed, 12 insertions, 7 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index ae420977..39888235 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -3607,3 +3607,6 @@ Jürgen Schneider <jsffm@web.de> for reporting a possible discrepancy of the primary device number in the LSTD and PRIM commands for adding support for EAC3 audio from other sources + +Stefan Verse <Verse@amotronics.de> + for fixing an occasional black screen when switching channels @@ -9463,3 +9463,6 @@ Video Disk Recorder Revision History - Added a device hook for detecting whether a device provides EIT data (thanks to Winfried Köhler). - Fixed memory handling in cString::Append() (reported by Stefan Herdler). +- Revised 'Fixed a possible deadlock when detaching a receiver from a device' from + version 2.3.9, which sometimes caused a black screen when switching channels + (thanks to Stefan Verse). @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 4.31 2020/06/10 14:52:43 kls Exp $ + * $Id: device.c 4.32 2020/06/12 09:28:44 kls Exp $ */ #include "device.h" @@ -1822,17 +1822,16 @@ void cDevice::Detach(cReceiver *Receiver) bool receiversLeft = false; mutexReceiver.Lock(); for (int i = 0; i < MAXRECEIVERS; i++) { - if (receiver[i] == Receiver) { + if (receiver[i] == Receiver) receiver[i] = NULL; - Receiver->device = NULL; - Receiver->Activate(false); - for (int n = 0; n < Receiver->numPids; n++) - DelPid(Receiver->pids[n]); - } else if (receiver[i]) receiversLeft = true; } mutexReceiver.Unlock(); + Receiver->device = NULL; + Receiver->Activate(false); + for (int n = 0; n < Receiver->numPids; n++) + DelPid(Receiver->pids[n]); if (camSlot) { if (Receiver->priority > MINPRIORITY) { // priority check to avoid an infinite loop with the CAM slot's caPidReceiver camSlot->StartDecrypting(); |