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

Side by Side Diff: media/base/video_codecs.cc

Issue 2320063002: Fixed access to `constraint_flags` array in ParseHEVCCodecId function. (Closed)
Patch Set: Created 4 years, 3 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
« 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "media/base/video_codecs.h" 5 #include "media/base/video_codecs.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 DVLOG(4) << __func__ << ": unexpected number of trailing bytes in HEVC " 271 DVLOG(4) << __func__ << ": unexpected number of trailing bytes in HEVC "
272 << "codec id " << codec_id; 272 << "codec id " << codec_id;
273 return false; 273 return false;
274 } 274 }
275 for (size_t i = 4; i < elem.size(); ++i) { 275 for (size_t i = 4; i < elem.size(); ++i) {
276 unsigned constr_byte = 0; 276 unsigned constr_byte = 0;
277 if (!base::HexStringToUInt(elem[i], &constr_byte) || constr_byte > 0xFF) { 277 if (!base::HexStringToUInt(elem[i], &constr_byte) || constr_byte > 0xFF) {
278 DVLOG(4) << __func__ << ": invalid constraint byte=" << elem[i]; 278 DVLOG(4) << __func__ << ": invalid constraint byte=" << elem[i];
279 return false; 279 return false;
280 } 280 }
281 constraint_flags[i] = constr_byte; 281 constraint_flags[i - 4] = constr_byte;
282 } 282 }
283 283
284 return true; 284 return true;
285 } 285 }
286 #endif 286 #endif
287 287
288 } // namespace media 288 } // namespace media
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