From 616e154c45b6d30233375c0d5f53027b47975bc9 Mon Sep 17 00:00:00 2001 From: Jochen Dolze Date: Tue, 23 Mar 2010 17:12:37 +0100 Subject: Fixed last -pedantic warning, added some info for VDR1.7.0 --- markad-standalone.cpp | 21 +++++++++++++++++---- 1 file 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++) -- cgit v1.2.3