mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed adding new source types in case they are already registered
This commit is contained in:
parent
f8058586f9
commit
a9f1297022
@ -1183,6 +1183,8 @@ Rolf Ahrenberg <Rolf.Ahrenberg@sci.fi>
|
||||
existing edited version of a recording
|
||||
for adding code for parsing LCN and AVC descriptors to libsi
|
||||
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
|
||||
|
4
HISTORY
4
HISTORY
@ -8203,7 +8203,7 @@ Video Disk Recorder Revision History
|
||||
- Fixed detecting broken video data streams when recording.
|
||||
- Fixed handling frame detection buffer length (reported by Eike Sauer).
|
||||
|
||||
2014-03-08: Version 2.1.6
|
||||
2014-03-09: Version 2.1.6
|
||||
|
||||
- Revoked "Fixed some compiler warnings with Clang 3.4.1" from ci.c, because this
|
||||
did not compile with older versions of gcc (thanks to Sören Moch).
|
||||
@ -8215,3 +8215,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).
|
||||
|
@ -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 3.1 2014/03/09 12:03:09 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
|
||||
|
11
sources.c
11
sources.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: sources.c 3.5 2013/12/28 11:33:08 kls Exp $
|
||||
* $Id: sources.c 3.6 2014/03/09 12:05:42 kls Exp $
|
||||
*/
|
||||
|
||||
#include "sources.h"
|
||||
@ -124,3 +124,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 3.2 2013/08/21 10:27:32 kls Exp $
|
||||
* $Id: sources.h 3.3 2014/03/09 11:59:49 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __SOURCES_H
|
||||
@ -62,6 +62,7 @@ public:
|
||||
class cSources : public cConfig<cSource> {
|
||||
public:
|
||||
cSource *Get(int Code);
|
||||
bool ContainsSourceType(char SourceType);
|
||||
};
|
||||
|
||||
extern cSources Sources;
|
||||
|
Loading…
Reference in New Issue
Block a user