Index: webrtc/modules/video_coding/utility/vp8_header_parser.cc |
diff --git a/webrtc/modules/video_coding/utility/vp8_header_parser.cc b/webrtc/modules/video_coding/utility/vp8_header_parser.cc |
index 631385d0f25095903e676f79dc24e04ea1e1c6cd..180b555c57adaf5224eda065bb6215bc07ec5caa 100644 |
--- a/webrtc/modules/video_coding/utility/vp8_header_parser.cc |
+++ b/webrtc/modules/video_coding/utility/vp8_header_parser.cc |
@@ -7,9 +7,10 @@ |
* in the file PATENTS. All contributing project authors may |
* be found in the AUTHORS file in the root of the source tree. |
*/ |
-#include "webrtc/modules/video_coding/utility/vp8_header_parser.h" |
+#include "webrtc/base/checks.h" |
#include "webrtc/base/logging.h" |
pbos-webrtc
2016/04/18 15:10:14
These should go below where they were, vp8_header_
jackychen_
2016/04/18 19:18:17
Done.
|
+#include "webrtc/modules/video_coding/utility/vp8_header_parser.h" |
namespace webrtc { |
@@ -75,7 +76,7 @@ static int VP8GetBit(VP8BitReader* const br, int prob) { |
if (br->bits_ < 0) { |
VP8LoadNewBytes(br); |
} |
- |
+ RTC_CHECK_GE(br->bits_, 0); |
pbos-webrtc
2016/04/18 15:10:14
You can't use this for network data. We cannot cra
jackychen_
2016/04/18 19:18:17
When VP8GetBit read invalid bitstream, it should p
|
const int pos = br->bits_; |
const uint8_t split = (range * prob) >> 8; |
const uint8_t value = static_cast<uint8_t>(br->value_ >> pos); |