Commit 0f5245f7 by ibaker Committed by microkatz

Use int for an unsigned byte value in Cea608Decoder

This is a no-op, but it's more 'correct' because it avoids any potential
sign mix-ups that come from storing an unsigned byte (with a
potentially set MSB) in a signed java byte variable.

PiperOrigin-RevId: 483409798
(cherry picked from commit 3d0f43a1)
parent 154cd424
...@@ -458,8 +458,8 @@ public final class Cea608Decoder extends CeaDecoder { ...@@ -458,8 +458,8 @@ public final class Cea608Decoder extends CeaDecoder {
ccData.reset(subtitleData.array(), subtitleData.limit()); ccData.reset(subtitleData.array(), subtitleData.limit());
boolean captionDataProcessed = false; boolean captionDataProcessed = false;
while (ccData.bytesLeft() >= packetLength) { while (ccData.bytesLeft() >= packetLength) {
byte ccHeader = int ccHeader = packetLength == 2 ? CC_IMPLICIT_DATA_HEADER : ccData.readUnsignedByte();
packetLength == 2 ? CC_IMPLICIT_DATA_HEADER : (byte) ccData.readUnsignedByte();
int ccByte1 = ccData.readUnsignedByte(); int ccByte1 = ccData.readUnsignedByte();
int ccByte2 = ccData.readUnsignedByte(); int ccByte2 = ccData.readUnsignedByte();
......
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