Hi, there seems to be problem in pausing replays of new recordings (output to FF). 4 out of 5 times vdr freezes when trying to continue the replay. Poll in PlayVideo runs into a timeout and a new write gives EAGAIN. This does not happen with old recordings. Most likely splitting long PES-packets not on frame-boundaries prevents the FF-driver from finding a good start-point after DvbDevice->Freeze(). A rough workaround is attached, but maybe the idea to dump the old remux code was not the best one, as long as the FF and some plugins need PES-output. Replaying TS with VLC gives lots of TS discontinuities for PID 0 and 132. Attached is a fix. Regards Johann
--- vdr-1.7.3/dvbdevice.c.dist 2009-01-10 21:46:50.000000000 +0100 +++ vdr-1.7.3/dvbdevice.c 2009-01-10 20:39:32.000000000 +0100 @@ -1302,14 +1302,24 @@ bool cDvbDevice::Flush(int TimeoutMs) return true; } +#define MAXPOLLTIMEOUTS 10 + int cDvbDevice::PlayVideo(const uchar *Data, int Length) { int w; + int PollTimeouts = 0; do { w = WriteAllOrNothing(fd_video, Data, Length, 1000, 10); + if (w < 0 && FATALERRNO) return w; if (w < 0 && errno == EAGAIN) { cPoller Poller(fd_video, true); - Poller.Poll(200); + if (Poller.Poll(200)) PollTimeouts = 0; + else PollTimeouts++; + if (PollTimeouts == MAXPOLLTIMEOUTS) { + dsyslog("PlayVideo returns -%d and reached PollTimeouts", -w); + Clear(); + return w; + } } } while (w != Length); return w;
--- vdr-1.7.3/remux.c.dist 2009-01-07 20:40:53.000000000 +0100 +++ vdr-1.7.3/remux.c 2009-01-10 14:48:31.000000000 +0100 @@ -320,7 +320,7 @@ uchar *cPatPmtGenerator::GetPat(void) uchar *cPatPmtGenerator::GetPmt(int &Index) { if (Index < numPmtPackets) { - IncCounter(patCounter, pmt[Index]); + IncCounter(pmtCounter, pmt[Index]); return pmt[Index++]; } return NULL;
_______________________________________________ vdr mailing list vdr@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr