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

Side by Side Diff: content/common/gpu/media/h264_parser.cc

Issue 10820016: Fix dead code bug in ParseSEI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/gpu/media/h264_parser.h" 5 #include "content/common/gpu/media/h264_parser.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 10
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 1175
1176 memset(sei_msg, 0, sizeof(*sei_msg)); 1176 memset(sei_msg, 0, sizeof(*sei_msg));
1177 1177
1178 READ_BITS_OR_RETURN(8, &byte); 1178 READ_BITS_OR_RETURN(8, &byte);
1179 while (byte == 0xff) { 1179 while (byte == 0xff) {
1180 sei_msg->type += 255; 1180 sei_msg->type += 255;
1181 READ_BITS_OR_RETURN(8, &byte); 1181 READ_BITS_OR_RETURN(8, &byte);
1182 } 1182 }
1183 sei_msg->type += byte; 1183 sei_msg->type += byte;
1184 1184
1185 READ_BITS_OR_RETURN(8, &byte);
1185 while (byte == 0xff) { 1186 while (byte == 0xff) {
1186 sei_msg->payload_size += 255; 1187 sei_msg->payload_size += 255;
1187 READ_BITS_OR_RETURN(8, &byte); 1188 READ_BITS_OR_RETURN(8, &byte);
1188 } 1189 }
1189 sei_msg->payload_size += byte; 1190 sei_msg->payload_size += byte;
1190 1191
1191 DVLOG(4) << "Found SEI message type: " << sei_msg->type 1192 DVLOG(4) << "Found SEI message type: " << sei_msg->type
1192 << " payload size: " << sei_msg->payload_size; 1193 << " payload size: " << sei_msg->payload_size;
1193 1194
1194 switch (sei_msg->type) { 1195 switch (sei_msg->type) {
1195 case H264SEIMessage::kSEIRecoveryPoint: 1196 case H264SEIMessage::kSEIRecoveryPoint:
1196 READ_UE_OR_RETURN(&sei_msg->recovery_point.recovery_frame_cnt); 1197 READ_UE_OR_RETURN(&sei_msg->recovery_point.recovery_frame_cnt);
1197 READ_BOOL_OR_RETURN(&sei_msg->recovery_point.exact_match_flag); 1198 READ_BOOL_OR_RETURN(&sei_msg->recovery_point.exact_match_flag);
1198 READ_BOOL_OR_RETURN(&sei_msg->recovery_point.broken_link_flag); 1199 READ_BOOL_OR_RETURN(&sei_msg->recovery_point.broken_link_flag);
1199 READ_BITS_OR_RETURN(2, 1200 READ_BITS_OR_RETURN(2,
1200 &sei_msg->recovery_point.changing_slice_group_idc); 1201 &sei_msg->recovery_point.changing_slice_group_idc);
1201 break; 1202 break;
1202 1203
1203 default: 1204 default:
1204 DVLOG(4) << "Unsupported SEI message"; 1205 DVLOG(4) << "Unsupported SEI message";
1205 break; 1206 break;
1206 } 1207 }
1207 1208
1208 return kOk; 1209 return kOk;
1209 } 1210 }
1210 1211
1211 } // namespace content 1212 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698