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

Side by Side Diff: media/filters/jpeg_parser.cc

Issue 1542013004: Switch to standard integer types in media/, take 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more stddef Created 4 years, 12 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 | « media/filters/ivf_parser_unittest.cc ('k') | media/filters/jpeg_parser_unittest.cc » ('j') | 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/filters/jpeg_parser.h" 5 #include "media/filters/jpeg_parser.h"
6 6
7 #include "base/big_endian.h" 7 #include "base/big_endian.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/macros.h"
9 10
10 using base::BigEndianReader; 11 using base::BigEndianReader;
11 12
12 #define READ_U8_OR_RETURN_FALSE(out) \ 13 #define READ_U8_OR_RETURN_FALSE(out) \
13 do { \ 14 do { \
14 uint8_t _out; \ 15 uint8_t _out; \
15 if (!reader.ReadU8(&_out)) { \ 16 if (!reader.ReadU8(&_out)) { \
16 DVLOG(1) \ 17 DVLOG(1) \
17 << "Error in stream: unexpected EOS while trying to read " #out; \ 18 << "Error in stream: unexpected EOS while trying to read " #out; \
18 return false; \ 19 return false; \
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 DLOG(ERROR) << "SearchEOI failed"; 473 DLOG(ERROR) << "SearchEOI failed";
473 return false; 474 return false;
474 } 475 }
475 DCHECK(eoi_ptr); 476 DCHECK(eoi_ptr);
476 result->data_size = eoi_ptr - result->data; 477 result->data_size = eoi_ptr - result->data;
477 result->image_size = eoi_ptr - reinterpret_cast<const char*>(buffer); 478 result->image_size = eoi_ptr - reinterpret_cast<const char*>(buffer);
478 return true; 479 return true;
479 } 480 }
480 481
481 } // namespace media 482 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/ivf_parser_unittest.cc ('k') | media/filters/jpeg_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698