diff options
-rw-r--r-- | CONTRIBUTORS | 2 | ||||
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | sourceparams.c | 6 | ||||
-rw-r--r-- | sources.c | 11 | ||||
-rw-r--r-- | sources.h | 3 |
5 files changed, 20 insertions, 6 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index ad968731..ee4e81c4 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1176,6 +1176,8 @@ Rolf Ahrenberg <Rolf.Ahrenberg@sci.fi> for a patch that was used to rename the "plp id" to a more general "stream id" and add support for DVB-S2 "Input Stream Identifier" (ISI) for fixing clearing non-editable members in the channel editor + for reporting a problem with adding new source types in case they are already + registered Ralf Klueber <ralf.klueber@vodafone.com> for reporting a bug in cutting a recording if there is only a single editing mark @@ -7870,7 +7870,7 @@ Video Disk Recorder Revision History and also to use the correct directory with --edit (the latter reported by Marko Mäkelä). -2014-03-08: Version 2.0.6 +2014-03-09: Version 2.0.6 - Updated 'sources.conf' (thanks to Antti Hartikainen). - cFont::CreateFont() now returns a dummy font in case there are no fonts installed. @@ -7904,3 +7904,5 @@ Video Disk Recorder Revision History on some HD channels to get stuck and resulted in buffer overflows. - Fixed handling PAT packets when detecting frames, so that they can be properly taken into account when regenerating the index of a recording. +- Fixed adding new source types in case they are already registered (reported by Rolf + Ahrenberg). diff --git a/sourceparams.c b/sourceparams.c index 04317895..6d85f86c 100644 --- a/sourceparams.c +++ b/sourceparams.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: sourceparams.c 1.2 2010/03/06 11:13:39 kls Exp $ + * $Id: sourceparams.c 1.2.1.1 2014/03/09 12:13:18 kls Exp $ */ #include "sourceparams.h" @@ -21,8 +21,8 @@ cSourceParam::cSourceParam(char Source, const char *Description) return; } SourceParams.Add(this); - if (!strchr("ACST", Source)) // no, it's not "ATSC" ;-) - Sources.Add(new cSource(Source, Description)); + if (!Sources.ContainsSourceType(source)) + Sources.Add(new cSource(source, Description)); dsyslog("registered source parameters for '%c - %s'", source, Description); } else @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: sources.c 2.2 2010/02/28 15:15:39 kls Exp $ + * $Id: sources.c 2.2.1.1 2014/03/09 12:13:25 kls Exp $ */ #include "sources.h" @@ -112,3 +112,12 @@ cSource *cSources::Get(int Code) } return NULL; } + +bool cSources::ContainsSourceType(char SourceType) +{ + for (cSource *p = First(); p; p = Next(p)) { + if (cSource::ToChar(p->Code()) == SourceType) + return true; + } + return false; +} @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: sources.h 2.4 2012/06/17 11:19:23 kls Exp $ + * $Id: sources.h 2.4.1.1 2014/03/09 12:13:34 kls Exp $ */ #ifndef __SOURCES_H @@ -47,6 +47,7 @@ public: class cSources : public cConfig<cSource> { public: cSource *Get(int Code); + bool ContainsSourceType(char SourceType); }; extern cSources Sources; |