diff options
author | Jochen Dolze <vdr@dolze.de> | 2010-03-23 17:12:37 +0100 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2010-03-23 17:12:37 +0100 |
commit | 616e154c45b6d30233375c0d5f53027b47975bc9 (patch) | |
tree | b9ff655c5ce43101b26197a7dc44d1387cbc1734 /markad-standalone.cpp | |
parent | 9ec196d2f1245efbce3684f21027ea39b2501027 (diff) | |
download | vdr-plugin-markad-616e154c45b6d30233375c0d5f53027b47975bc9.tar.gz vdr-plugin-markad-616e154c45b6d30233375c0d5f53027b47975bc9.tar.bz2 |
Fixed last -pedantic warning, added some info for VDR1.7.0
Diffstat (limited to 'markad-standalone.cpp')
-rw-r--r-- | markad-standalone.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/markad-standalone.cpp b/markad-standalone.cpp index 98d9091..0959ce4 100644 --- a/markad-standalone.cpp +++ b/markad-standalone.cpp @@ -394,8 +394,15 @@ void cMarkAdStandalone::Process(const char *Directory) { if (bIndexError) { - esyslog("index doesn't match marks%s", - isTS ? ", please report this" : ", please run genindex"); + if ((macontext.General.VPid.Type==MARKAD_PIDTYPE_VIDEO_H264) && (!isTS)) + { + esyslog("index doesn't match marks, sorry you're lost"); + } + else + { + esyslog("index doesn't match marks%s", + isTS ? ", please recreate it" : ", please run genindex"); + } } } } @@ -437,8 +444,14 @@ bool cMarkAdStandalone::LoadInfo(const char *Directory) { if (line[0]=='C') { - int result=sscanf(line,"%*c %as %*s",&macontext.General.ChannelID); - if (result==0 || result==EOF) macontext.General.ChannelID=NULL; + int ntok=0; + char *str=line,*tok; + while ((tok=strtok(str," "))) + { + if (ntok==1) macontext.General.ChannelID=strdup(tok); + ntok++; + str=NULL; + } if (macontext.General.ChannelID) { for (int i=0; i<(int) strlen(macontext.General.ChannelID); i++) |