OLD | NEW |
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 Loading... |
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 |
OLD | NEW |