summaryrefslogtreecommitdiff
path: root/command/demux.cpp
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2010-08-09 23:45:30 +0200
committerJochen Dolze <vdr@dolze.de>2010-08-09 23:45:30 +0200
commit462f8e37728c3d835e9a922f4fb4b11c7619ea9d (patch)
tree0d5b1514f945797aa3038a97d1d421747ff85727 /command/demux.cpp
parentade86712df523fc7c10545cfe450b59f39a71ba7 (diff)
downloadvdr-plugin-markad-462f8e37728c3d835e9a922f4fb4b11c7619ea9d.tar.gz
vdr-plugin-markad-462f8e37728c3d835e9a922f4fb4b11c7619ea9d.tar.bz2
Fixed AC3 demux error on restart
Diffstat (limited to 'command/demux.cpp')
-rw-r--r--command/demux.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/command/demux.cpp b/command/demux.cpp
index 73bf110..97fd7d9 100644
--- a/command/demux.cpp
+++ b/command/demux.cpp
@@ -33,6 +33,10 @@ void cMarkAdDemux::Clear()
if (pes2audioes) pes2audioes->Clear();
if (pes2videoes) pes2videoes->Clear();
if (queue) queue->Clear();
+ pause=false;
+ pause_retval=0;
+ min_needed=0;
+ skip=0;
}
void cMarkAdDemux::ProcessVDR(MarkAdPid Pid, uchar *Data, int Count, uchar **Pkt, int *PktLen)
@@ -145,15 +149,20 @@ int cMarkAdDemux::GetMinNeeded(MarkAdPid Pid, uchar *Data, int Count, bool *Offc
if (Offcnt) *Offcnt=true;
return -needed;
}
- if (((Pid.Type==MARKAD_PIDTYPE_AUDIO_AC3) ||
- (Pid.Type==MARKAD_PIDTYPE_AUDIO_MP2)) && (stream!=0xC0))
+ if ((Pid.Type==MARKAD_PIDTYPE_AUDIO_MP2) && (stream!=0xC0))
+ {
+ // ignore 6 header bytes from queue->Put above
+ queue->Clear();
+ if (Offcnt) *Offcnt=true;
+ return -needed;
+ }
+ if ((Pid.Type==MARKAD_PIDTYPE_AUDIO_AC3) && (stream!=0xBD))
{
// ignore 6 header bytes from queue->Put above
queue->Clear();
if (Offcnt) *Offcnt=true;
return -needed;
}
-
return needed+6;
}
else