aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
authornox <nox@FreeBSD.org>2011-12-11 01:14:43 +0800
committernox <nox@FreeBSD.org>2011-12-11 01:14:43 +0800
commit64a21d359e87a8e51dfcabfb9dda0fda1101d440 (patch)
tree32092f25664ad80064798583dd7ba770485c4a65 /multimedia
parent7fe218584cbbd0dbfd7eabd65bc83dff68c347f1 (diff)
downloadfreebsd-ports-gnome-64a21d359e87a8e51dfcabfb9dda0fda1101d440.tar.gz
freebsd-ports-gnome-64a21d359e87a8e51dfcabfb9dda0fda1101d440.tar.zst
freebsd-ports-gnome-64a21d359e87a8e51dfcabfb9dda0fda1101d440.zip
Fix startup crash without setup.conf by merging fix from upstream.
Feature safe: yes
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/vdr/Makefile2
-rw-r--r--multimedia/vdr/files/patch-initialchannel33
2 files changed, 34 insertions, 1 deletions
diff --git a/multimedia/vdr/Makefile b/multimedia/vdr/Makefile
index eb1ad6ce1613..997e06ebb2f7 100644
--- a/multimedia/vdr/Makefile
+++ b/multimedia/vdr/Makefile
@@ -7,7 +7,7 @@
PORTNAME= vdr
PORTVERSION= 1.7.19
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= multimedia
MASTER_SITES= ftp://ftp.tvdr.de/vdr/Developer/
diff --git a/multimedia/vdr/files/patch-initialchannel b/multimedia/vdr/files/patch-initialchannel
new file mode 100644
index 000000000000..cb658665a03d
--- /dev/null
+++ b/multimedia/vdr/files/patch-initialchannel
@@ -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);