summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2012-10-15 23:32:11 +0200
committerJochen Dolze <vdr@dolze.de>2012-10-15 23:32:11 +0200
commit7e3a33b48e1a0e1b958324780f6ce61e03acba78 (patch)
tree6d26d5c0f0497f107247780fc6fc633c60c9f3d6
parent59e7ed171851cf46185820b421a35a906540fedd (diff)
downloadvdr-plugin-markad-7e3a33b48e1a0e1b958324780f6ce61e03acba78.tar.gz
vdr-plugin-markad-7e3a33b48e1a0e1b958324780f6ce61e03acba78.tar.bz2
Fixed demux abort when stream error bit is set (reported by satellit)
-rw-r--r--command/demux.cpp12
-rw-r--r--command/markad-standalone.cpp8
2 files changed, 14 insertions, 6 deletions
diff --git a/command/demux.cpp b/command/demux.cpp
index 17008b9..991a82f 100644
--- a/command/demux.cpp
+++ b/command/demux.cpp
@@ -686,10 +686,16 @@ bool cTS2Pkt::Process(uchar *TSData, int TSSize, AvPacket *Pkt)
return true;
}
- if ((tshdr->TError) && (lasterror!=ERR_HDRBIT))
+ if (tshdr->TError)
{
- lasterror=ERR_HDRBIT;
- esyslog("stream error bit set (0x%04x)",pid);
+ if (lasterror!=ERR_HDRBIT) {
+ lasterror=ERR_HDRBIT;
+ esyslog("stream error bit set (0x%04x)",pid);
+ }
+ Clear(Pkt);
+ skipped+=queue->Skipped();
+ skipped+=TS_SIZE;
+ return true;
}
int buflen=TS_SIZE+1;
diff --git a/command/markad-standalone.cpp b/command/markad-standalone.cpp
index f4e7b5d..8385043 100644
--- a/command/markad-standalone.cpp
+++ b/command/markad-standalone.cpp
@@ -1513,6 +1513,7 @@ time_t cMarkAdStandalone::GetBroadcastStart(time_t start, int bstart, int fd)
// try to get from mtime
// (and hope info.vdr has not changed after the start of the recording)
+ /*
if (fstat(fd,&statbuf)!=-1)
{
if (fabs(difftime(start,statbuf.st_mtime))<1800)
@@ -1521,8 +1522,9 @@ time_t cMarkAdStandalone::GetBroadcastStart(time_t start, int bstart, int fd)
return (time_t) statbuf.st_mtime;
}
}
+ */
- // fallback to the directory -> worst starttime we can use!
+ // fallback to the directory
const char *timestr=strrchr(directory,'/');
if (timestr)
{
@@ -1539,7 +1541,7 @@ time_t cMarkAdStandalone::GetBroadcastStart(time_t start, int bstart, int fd)
t.tm_mon--;
t.tm_sec=0;
t.tm_isdst=-1;
- isyslog("getting broadcast start from directory (can be wrong)");
+ isyslog("getting broadcast start from directory");
time_t e=mktime(&t);
e-=(time_t) bstart;
return e;
@@ -1654,7 +1656,7 @@ bool cMarkAdStandalone::LoadInfo()
bstart=startTime-bstart;
}
}
- if ((bstart>3600) || (bstart<0)) bstart=0;
+ if ((bstart>3600) || (bstart<0)) bstart=0;
}
if (line[0]=='F')
{