mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-26 05:02:18 +00:00
Fix startup crash without setup.conf by merging fix from upstream.
Feature safe: yes
This commit is contained in:
parent
aa07758c85
commit
7eaded3bda
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=287152
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= vdr
|
||||
PORTVERSION= 1.7.19
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= multimedia
|
||||
MASTER_SITES= ftp://ftp.tvdr.de/vdr/Developer/
|
||||
|
||||
|
33
multimedia/vdr/files/patch-initialchannel
Normal file
33
multimedia/vdr/files/patch-initialchannel
Normal file
@ -0,0 +1,33 @@
|
||||
--- config.c.orig
|
||||
+++ config.c
|
||||
@@ -399,7 +399,7 @@ cSetup::cSetup(void)
|
||||
CurrentChannel = -1;
|
||||
CurrentVolume = MAXVOLUME;
|
||||
CurrentDolby = 0;
|
||||
- // InitialChannel is initialized by constructor
|
||||
+ InitialChannel = "";
|
||||
InitialVolume = -1;
|
||||
ChannelsWrap = 0;
|
||||
EmergencyExit = 1;
|
||||
--- vdr.c.orig
|
||||
+++ vdr.c
|
||||
@@ -735,12 +723,14 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (!cDevice::WaitForAllDevicesReady(DEVICEREADYTIMEOUT))
|
||||
dsyslog("not all devices ready after %d seconds", DEVICEREADYTIMEOUT);
|
||||
- if (isnumber(Setup.InitialChannel)) { // for compatibility with old setup.conf files
|
||||
- if (cChannel *Channel = Channels.GetByNumber(atoi(Setup.InitialChannel)))
|
||||
- Setup.InitialChannel = Channel->GetChannelID().ToString();
|
||||
+ if (*Setup.InitialChannel) {
|
||||
+ if (isnumber(Setup.InitialChannel)) { // for compatibility with old setup.conf files
|
||||
+ if (cChannel *Channel = Channels.GetByNumber(atoi(Setup.InitialChannel)))
|
||||
+ Setup.InitialChannel = Channel->GetChannelID().ToString();
|
||||
+ }
|
||||
+ if (cChannel *Channel = Channels.GetByChannelID(tChannelID::FromString(Setup.InitialChannel)))
|
||||
+ Setup.CurrentChannel = Channel->Number();
|
||||
}
|
||||
- if (cChannel *Channel = Channels.GetByChannelID(tChannelID::FromString(Setup.InitialChannel)))
|
||||
- Setup.CurrentChannel = Channel->Number();
|
||||
if (Setup.InitialVolume >= 0)
|
||||
Setup.CurrentVolume = Setup.InitialVolume;
|
||||
Channels.SwitchTo(Setup.CurrentChannel);
|
Loading…
Reference in New Issue
Block a user