| Index: content/common/gpu/media/h264_bit_reader.cc
|
| diff --git a/content/common/gpu/media/h264_bit_reader.cc b/content/common/gpu/media/h264_bit_reader.cc
|
| index b8d00e174a33ef36461c82dfc34b4046dc3f6fd5..22528a98fa01f7f9c22dec2c2d997b030619d947 100644
|
| --- a/content/common/gpu/media/h264_bit_reader.cc
|
| +++ b/content/common/gpu/media/h264_bit_reader.cc
|
| @@ -42,4 +42,24 @@ void H264BitReader::UpdateCurrByte() {
|
| }
|
| }
|
|
|
| +bool H264BitReader::HasMoreRBSPData() {
|
| + // Make sure we have more bits, if we are at 0 bits in current byte
|
| + // and updating current byte fails, we don't have more data anyway.
|
| + if (num_remaining_bits_in_curr_byte_ == 0) {
|
| + UpdateCurrByte();
|
| + if (num_remaining_bits_in_curr_byte_ == 0)
|
| + return false;
|
| + }
|
| +
|
| + // Not on last byte?
|
| + if (bytes_left_)
|
| + return true;
|
| +
|
| + // Last byte, look for stop bit;
|
| + // We have more RBSP data if the last non-zero bit we find is not the
|
| + // first available bit.
|
| + return (curr_byte_ &
|
| + ((1 << (num_remaining_bits_in_curr_byte_ - 1)) - 1)) != 0;
|
| +}
|
| +
|
| } // namespace content
|
|
|