Commit 04b57f9c by olly Committed by Oliver Woodman

Fix DvbParser bug

Issue: #2957

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160628086
parent 28030b6c
...@@ -667,13 +667,15 @@ import java.util.List; ...@@ -667,13 +667,15 @@ import java.util.List;
int runLength = 0; int runLength = 0;
int clutIndex = 0; int clutIndex = 0;
int peek = data.readBits(2); int peek = data.readBits(2);
if (!data.readBit()) { if (peek != 0x00) {
runLength = 1; runLength = 1;
clutIndex = peek; clutIndex = peek;
} else if (data.readBit()) { } else if (data.readBit()) {
runLength = 3 + data.readBits(3); runLength = 3 + data.readBits(3);
clutIndex = data.readBits(2); clutIndex = data.readBits(2);
} else if (!data.readBit()) { } else if (data.readBit()) {
runLength = 1;
} else {
switch (data.readBits(2)) { switch (data.readBits(2)) {
case 0x00: case 0x00:
endOfPixelCodeString = true; endOfPixelCodeString = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment