From 7e3a33b48e1a0e1b958324780f6ce61e03acba78 Mon Sep 17 00:00:00 2001 From: Jochen Dolze Date: Mon, 15 Oct 2012 23:32:11 +0200 Subject: Fixed demux abort when stream error bit is set (reported by satellit) --- command/demux.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'command/demux.cpp') 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; -- cgit v1.2.3