mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed a deadlock when switching channels via Schedule/Now|Next/Switch
This commit is contained in:
parent
90af5a1bd9
commit
9f5397b510
@ -39,6 +39,7 @@ Martin Hammerschmid <martin@hammerschmid.com>
|
||||
for suggesting to display the direct channel select input on the OSD
|
||||
for suggesting to use the "Blue" button in the main menu to resume replay
|
||||
for implementing pege up/down with the "Left" and "Right" keys
|
||||
for detecting a deadlock when switching channels via Schedule/Now|Next/Switch
|
||||
|
||||
Bastian Guse <bastian@nocopy.de>
|
||||
for writing the FORMATS entry for timers.conf
|
||||
|
6
HISTORY
6
HISTORY
@ -1047,3 +1047,9 @@ Video Disk Recorder Revision History
|
||||
|
||||
- Fixed a crash in case there is no 'epg.data' at program start (thanks to
|
||||
Andreas Schultz).
|
||||
|
||||
2002-03-01: Version 1.0.0pre3
|
||||
|
||||
- Fixed parsing 'E' records in epg2html.pl.
|
||||
- Fixed a deadlock when switching channels via Schedule/Now|Next/Switch (reported
|
||||
by Martin Hammerschmid).
|
||||
|
4
config.h
4
config.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: config.h 1.100 2002/02/25 16:29:09 kls Exp $
|
||||
* $Id: config.h 1.101 2002/02/26 17:25:30 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __CONFIG_H
|
||||
@ -19,7 +19,7 @@
|
||||
#include "eit.h"
|
||||
#include "tools.h"
|
||||
|
||||
#define VDRVERSION "1.0.0pre2"
|
||||
#define VDRVERSION "1.0.0pre3"
|
||||
|
||||
#define MAXPRIORITY 99
|
||||
#define MAXLIFETIME 99
|
||||
|
5
dvbapi.c
5
dvbapi.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: dvbapi.c 1.152 2002/02/24 12:53:51 kls Exp $
|
||||
* $Id: dvbapi.c 1.153 2002/03/02 09:37:56 kls Exp $
|
||||
*/
|
||||
|
||||
#include "dvbapi.h"
|
||||
@ -2238,9 +2238,6 @@ bool cDvbApi::SetPids(bool ForRecording)
|
||||
|
||||
eSetChannelResult cDvbApi::SetChannel(int ChannelNumber, int Frequency, char Polarization, int Diseqc, int Srate, int Vpid, int Apid1, int Apid2, int Dpid1, int Dpid2, int Tpid, int Ca, int Pnr)
|
||||
{
|
||||
// Make sure the siProcessor won't access the device while switching
|
||||
cThreadLock ThreadLock(siProcessor);
|
||||
|
||||
StopTransfer();
|
||||
StopReplay();
|
||||
|
||||
|
22
eit.c
22
eit.c
@ -16,7 +16,7 @@
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* $Id: eit.c 1.38 2002/02/25 16:30:42 kls Exp $
|
||||
* $Id: eit.c 1.39 2002/03/01 16:32:11 kls Exp $
|
||||
***************************************************************************/
|
||||
|
||||
#include "eit.h"
|
||||
@ -1047,8 +1047,6 @@ const char *cSIProcessor::GetEpgDataFileName(void)
|
||||
|
||||
void cSIProcessor::SetStatus(bool On)
|
||||
{
|
||||
LOCK_THREAD;
|
||||
schedulesMutex.Lock();
|
||||
ShutDownFilters();
|
||||
if (On)
|
||||
{
|
||||
@ -1061,7 +1059,6 @@ void cSIProcessor::SetStatus(bool On)
|
||||
AddFilter(0x12, 0x51); // event info, actual TS, schedule for another 4 days
|
||||
AddFilter(0x12, 0x61); // event info, other TS, schedule for another 4 days
|
||||
}
|
||||
schedulesMutex.Unlock();
|
||||
}
|
||||
|
||||
/** use the vbi device to parse all relevant SI
|
||||
@ -1085,20 +1082,15 @@ void cSIProcessor::Action()
|
||||
struct tm *ptm = localtime_r(&now, &tm_r);
|
||||
if (now - lastCleanup > 3600 && ptm->tm_hour == 5)
|
||||
{
|
||||
LOCK_THREAD;
|
||||
|
||||
schedulesMutex.Lock();
|
||||
cMutexLock MutexLock(&schedulesMutex);
|
||||
isyslog(LOG_INFO, "cleaning up schedules data");
|
||||
schedules->Cleanup();
|
||||
schedulesMutex.Unlock();
|
||||
lastCleanup = now;
|
||||
ReportEpgBugFixStats(true);
|
||||
}
|
||||
if (epgDataFileName && now - lastDump > 600)
|
||||
{
|
||||
LOCK_THREAD;
|
||||
|
||||
schedulesMutex.Lock();
|
||||
cMutexLock MutexLock(&schedulesMutex);
|
||||
FILE *f = fopen(GetEpgDataFileName(), "w");
|
||||
if (f) {
|
||||
schedules->Dump(f);
|
||||
@ -1107,7 +1099,6 @@ void cSIProcessor::Action()
|
||||
else
|
||||
LOG_ERROR;
|
||||
lastDump = now;
|
||||
schedulesMutex.Unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1162,12 +1153,9 @@ void cSIProcessor::Action()
|
||||
case 0x12:
|
||||
if (buf[0] != 0x72)
|
||||
{
|
||||
LOCK_THREAD;
|
||||
|
||||
schedulesMutex.Lock();
|
||||
cMutexLock MutexLock(&schedulesMutex);
|
||||
cEIT ceit(buf, seclen, schedules);
|
||||
ceit.ProcessEIT(buf);
|
||||
schedulesMutex.Unlock();
|
||||
}
|
||||
else
|
||||
dsyslog(LOG_INFO, "Received stuffing section in EIT\n");
|
||||
@ -1261,6 +1249,6 @@ bool cSIProcessor::ShutDownFilters(void)
|
||||
/** */
|
||||
bool cSIProcessor::SetCurrentServiceID(unsigned short servid)
|
||||
{
|
||||
LOCK_THREAD;
|
||||
cMutexLock MutexLock(&schedulesMutex);
|
||||
return schedules ? schedules->SetCurrentServiceID(servid) : false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user