diff options
author | Jochen Dolze <vdr@dolze.de> | 2010-08-15 21:41:32 +0200 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2010-08-15 21:41:32 +0200 |
commit | 032f8437299515c83a0fe148e66c0230d0dad8fa (patch) | |
tree | ddede2e7e0e8d63c7dd0f1a59c6e99099ea74425 /command/demux.cpp | |
parent | 462f8e37728c3d835e9a922f4fb4b11c7619ea9d (diff) | |
download | vdr-plugin-markad-032f8437299515c83a0fe148e66c0230d0dad8fa.tar.gz vdr-plugin-markad-032f8437299515c83a0fe148e66c0230d0dad8fa.tar.bz2 |
Fixed demux error with AC3 on VDR files (added in the last commits)
Fixed writing info files
Few cleanups
Diffstat (limited to 'command/demux.cpp')
-rw-r--r-- | command/demux.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/command/demux.cpp b/command/demux.cpp index 97fd7d9..23bd78e 100644 --- a/command/demux.cpp +++ b/command/demux.cpp @@ -126,30 +126,30 @@ int cMarkAdDemux::GetMinNeeded(MarkAdPid Pid, uchar *Data, int Count, bool *Offc { if (Pid.Num>=0) return TS_SIZE; - uchar *qData=queue->Peek(6); + uchar *qData=queue->Peek(PESHDRSIZE); if (!qData) { - int len=6-queue->Length(); + int len=PESHDRSIZE-queue->Length(); int cnt=(Count>len) ? len : Count; queue->Put(Data,cnt); return -cnt; } - int stream=qData[3] & 0xF0; + int stream=qData[3]; if ((qData[0]==0) && (qData[1]==0) && (qData[2]==1) && (stream>0xBC)) { int needed=qData[4]*256+qData[5]; if (((Pid.Type==MARKAD_PIDTYPE_VIDEO_H262) || - (Pid.Type==MARKAD_PIDTYPE_VIDEO_H264)) && (stream!=0xE0)) + (Pid.Type==MARKAD_PIDTYPE_VIDEO_H264)) && ((stream & 0xF0)!=0xE0)) { // ignore 6 header bytes from queue->Put above queue->Clear(); if (Offcnt) *Offcnt=true; return -needed; } - if ((Pid.Type==MARKAD_PIDTYPE_AUDIO_MP2) && (stream!=0xC0)) + if ((Pid.Type==MARKAD_PIDTYPE_AUDIO_MP2) && ((stream & 0xF0)!=0xC0)) { // ignore 6 header bytes from queue->Put above queue->Clear(); @@ -163,7 +163,7 @@ int cMarkAdDemux::GetMinNeeded(MarkAdPid Pid, uchar *Data, int Count, bool *Offc if (Offcnt) *Offcnt=true; return -needed; } - return needed+6; + return needed+PESHDRSIZE; } else { |