Commit 542a73f8 authored by xiaomings@google.com's avatar xiaomings@google.com

Fix a bug that H264BitReader::ReadBits cannot read more than 16 bits.


TEST=H264BitReaderTest::ReadStreamWithoutEscapeAndTrailingZeroBytes in h264_parser_unittest.

Review URL: https://chromiumcodereview.appspot.com/10843057

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149733 0039d316-1c4b-4281-b951-d872f2087c98
parent 7bfab8f3
......@@ -66,7 +66,7 @@ bool H264BitReader::ReadBits(int num_bits, int *out) {
while (num_remaining_bits_in_curr_byte_ < bits_left) {
// Take all that's left in current byte, shift to make space for the rest.
*out = (curr_byte_ << (bits_left - num_remaining_bits_in_curr_byte_));
*out |= (curr_byte_ << (bits_left - num_remaining_bits_in_curr_byte_));
bits_left -= num_remaining_bits_in_curr_byte_;
if (!UpdateCurrByte())
......
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 to comment