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

Side by Side Diff: media/formats/mp4/box_definitions.cc

Issue 413393006: Fix two uninitialized variables in media (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style nits mostly back to ps2 Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/filters/stream_parser_factory.cc ('k') | 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/formats/mp4/box_definitions.h" 5 #include "media/formats/mp4/box_definitions.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/formats/mp4/es_descriptor.h" 8 #include "media/formats/mp4/es_descriptor.h"
9 #include "media/formats/mp4/rcheck.h" 9 #include "media/formats/mp4/rcheck.h"
10 10
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 bool sample_size_present = (flags & 0x200) != 0; 754 bool sample_size_present = (flags & 0x200) != 0;
755 bool sample_flags_present = (flags & 0x400) != 0; 755 bool sample_flags_present = (flags & 0x400) != 0;
756 bool sample_composition_time_offsets_present = (flags & 0x800) != 0; 756 bool sample_composition_time_offsets_present = (flags & 0x800) != 0;
757 757
758 if (data_offset_present) { 758 if (data_offset_present) {
759 RCHECK(reader->Read4(&data_offset)); 759 RCHECK(reader->Read4(&data_offset));
760 } else { 760 } else {
761 data_offset = 0; 761 data_offset = 0;
762 } 762 }
763 763
764 uint32 first_sample_flags; 764 uint32 first_sample_flags = 0;
765 if (first_sample_flags_present) 765 if (first_sample_flags_present)
766 RCHECK(reader->Read4(&first_sample_flags)); 766 RCHECK(reader->Read4(&first_sample_flags));
767 767
768 int fields = sample_duration_present + sample_size_present + 768 int fields = sample_duration_present + sample_size_present +
769 sample_flags_present + sample_composition_time_offsets_present; 769 sample_flags_present + sample_composition_time_offsets_present;
770 RCHECK(reader->HasBytes(fields * sample_count)); 770 RCHECK(reader->HasBytes(fields * sample_count));
771 771
772 if (sample_duration_present) 772 if (sample_duration_present)
773 sample_durations.resize(sample_count); 773 sample_durations.resize(sample_count);
774 if (sample_size_present) 774 if (sample_size_present)
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 SampleDependsOn IndependentAndDisposableSamples::sample_depends_on( 950 SampleDependsOn IndependentAndDisposableSamples::sample_depends_on(
951 size_t i) const { 951 size_t i) const {
952 if (i >= sample_depends_on_.size()) 952 if (i >= sample_depends_on_.size())
953 return kSampleDependsOnUnknown; 953 return kSampleDependsOnUnknown;
954 954
955 return sample_depends_on_[i]; 955 return sample_depends_on_[i];
956 } 956 }
957 957
958 } // namespace mp4 958 } // namespace mp4
959 } // namespace media 959 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/stream_parser_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698