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);