From ec5197655820d86395473076a975283b750ba66a Mon Sep 17 00:00:00 2001 From: Mark Calderbank Date: Sat, 13 May 2006 23:27:54 +0000 Subject: [PATCH] Bug fix --- demuxervdr.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/demuxervdr.cc b/demuxervdr.cc index c65c06d..28668c3 100644 --- a/demuxervdr.cc +++ b/demuxervdr.cc @@ -164,9 +164,11 @@ int DemuxerVDR::put(UCHAR* buf, int len, ULLONG cur_pos) case 0: case -1: if (*buf == 0x00) state--; else state = 0; + buf++; len--; ret++; break; case -2: if (*buf == 0x01) state--; else if (*buf != 0x00) state = 0; + buf++; len--; ret++; break; case -3: if ((*buf >= PESTYPE_VID0 && *buf <= PESTYPE_VIDMAX) || @@ -175,24 +177,25 @@ int DemuxerVDR::put(UCHAR* buf, int len, ULLONG cur_pos) { packet.init(*buf); state--; - break; } else if (*buf == 0x00) state = -1; else state = 0; + buf++; len--; ret++; break; case -4: packetLength = ((UINT)*buf) << 8; state--; + buf++; len--; ret++; break; case -5: packetLength += *buf; state--; + buf++; len--; ret++; break; } - buf++; len--; ret++; #ifdef NEW_DEMUXER current_position++; #endif -- 2.39.5