now work with 'ff 00 ff 00' in the file

This commit is contained in:
Xavier Henner 2015-05-01 00:55:17 +02:00
parent dad1548722
commit cac0ed8f57

View File

@ -252,7 +252,7 @@ func (r *Unsynchroniser) Read(p []byte) (int, error) {
}
if r.prevWasFF && p[i] == 0 {
p[i] = p[i+1]
r.prevWasFF = false
r.prevWasFF = (p[i+1] == 255)
continue
}
if p[i] == 255 && p[i+1] == 0 {