Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(857)

Unified Diff: content/common/gpu/media/h264_parser.cc

Issue 10837058: Make H264BitReader ignore trailing zero bytes and stop bit. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address CR comments. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/media/h264_parser.cc
diff --git a/content/common/gpu/media/h264_parser.cc b/content/common/gpu/media/h264_parser.cc
index db4622f068dd694d9668bd2125ed8cb6ce89d9de..05a3a7c38975558834fe5fb190b9fbe96bb4bf45 100644
--- a/content/common/gpu/media/h264_parser.cc
+++ b/content/common/gpu/media/h264_parser.cc
@@ -724,8 +724,9 @@ H264Parser::Result H264Parser::ParsePPS(int* pps_id) {
READ_BOOL_OR_RETURN(&pps->constrained_intra_pred_flag);
READ_BOOL_OR_RETURN(&pps->redundant_pic_cnt_present_flag);
- if (br_.HasMoreRBSPData()) {
- READ_BOOL_OR_RETURN(&pps->transform_8x8_mode_flag);
+ int temp;
+ if (br_.ReadBits(1, &temp)) {
+ pps->transform_8x8_mode_flag = temp != 0;
Ami GONE FROM CHROMIUM 2012/08/02 19:49:48 !=0 unnecessary
xiaomings 2012/08/03 00:37:58 Done.
READ_BOOL_OR_RETURN(&pps->pic_scaling_matrix_present_flag);
if (pps->pic_scaling_matrix_present_flag) {

Powered by Google App Engine
This is Rietveld 408576698