Index: media/filters/source_buffer_stream.h |
diff --git a/media/filters/source_buffer_stream.h b/media/filters/source_buffer_stream.h |
index f178c7db2602e91f3ad7ff6c0d0eb7edb419d7dd..31b3f33475e208afd25140b8241b5a8078eb8b7e 100644 |
--- a/media/filters/source_buffer_stream.h |
+++ b/media/filters/source_buffer_stream.h |
@@ -348,12 +348,12 @@ class MEDIA_EXPORT SourceBufferStream { |
// GetNextBuffer() is only allows to return buffers that have a |
// config ID that matches this index. If there is a mismatch then |
// it must signal that a config change is needed. |
- int current_config_index_; |
+ int current_config_index_ = 0; |
// Indicates which decoder config to associate with new buffers |
// being appended. Each new buffer appended has its config ID set |
// to the value of this field. |
- int append_config_index_; |
+ int append_config_index_ = 0; |
// Holds the audio/video configs for this stream. |current_config_index_| |
// and |append_config_index_| represent indexes into one of these vectors. |
@@ -365,10 +365,10 @@ class MEDIA_EXPORT SourceBufferStream { |
// True if more data needs to be appended before the Seek() can complete, |
// false if no Seek() has been requested or the Seek() is completed. |
- bool seek_pending_; |
+ bool seek_pending_ = false; |
// True if the end of the stream has been signalled. |
- bool end_of_stream_; |
+ bool end_of_stream_ = false; |
// Timestamp of the last request to Seek(). |
base::TimeDelta seek_buffer_timestamp_; |
@@ -376,7 +376,7 @@ class MEDIA_EXPORT SourceBufferStream { |
// Pointer to the seeked-to Range. This is the range from which |
// GetNextBuffer() calls are fulfilled after the |track_buffer_| has been |
// emptied. |
- SourceBufferRange* selected_range_; |
+ SourceBufferRange* selected_range_ = nullptr; |
// Queue of the next buffers to be returned from calls to GetNextBuffer(). If |
// |track_buffer_| is empty, return buffers from |selected_range_|. |
@@ -384,7 +384,7 @@ class MEDIA_EXPORT SourceBufferStream { |
// If there has been no intervening Seek, this will be true if the last |
// emitted buffer emptied |track_buffer_|. |
- bool just_exhausted_track_buffer_; |
+ bool just_exhausted_track_buffer_ = false; |
// The start time of the current media segment being appended. |
DecodeTimestamp media_segment_start_time_; |
@@ -393,12 +393,12 @@ class MEDIA_EXPORT SourceBufferStream { |
RangeList::iterator range_for_next_append_; |
// True when the next call to Append() begins a new media segment. |
- bool new_media_segment_; |
+ bool new_media_segment_ = false; |
// The timestamp of the last buffer appended to the media segment, set to |
// kNoDecodeTimestamp() if the beginning of the segment. |
DecodeTimestamp last_appended_buffer_timestamp_; |
- bool last_appended_buffer_is_keyframe_; |
+ bool last_appended_buffer_is_keyframe_ = false; |
// The decode timestamp on the last buffer returned by the most recent |
// GetNextBuffer() call. Set to kNoDecodeTimestamp() if GetNextBuffer() hasn't |
@@ -415,7 +415,7 @@ class MEDIA_EXPORT SourceBufferStream { |
// and GetCurrentXXXDecoderConfig() must be called to update the current |
// config. GetNextBuffer() must not be called again until |
// GetCurrentXXXDecoderConfig() has been called. |
- bool config_change_pending_; |
+ bool config_change_pending_ = false; |
// Used by HandleNextBufferWithSplice() or HandleNextBufferWithPreroll() when |
// a splice frame buffer or buffer with preroll is returned from |
@@ -424,18 +424,18 @@ class MEDIA_EXPORT SourceBufferStream { |
// Indicates which of the splice buffers in |splice_buffer_| should be |
// handled out next. |
- size_t splice_buffers_index_; |
+ size_t splice_buffers_index_ = 0; |
// Indicates that all buffers before |pending_buffer_| have been handed out. |
- bool pending_buffers_complete_; |
+ bool pending_buffers_complete_ = false; |
// Indicates that splice frame generation is enabled. |
const bool splice_frames_enabled_; |
// To prevent log spam, count the number of warnings and successes logged. |
- int num_splice_generation_warning_logs_; |
- int num_splice_generation_success_logs_; |
- int num_track_buffer_gap_warning_logs_; |
+ int num_splice_generation_warning_logs_ = 0; |
+ int num_splice_generation_success_logs_ = 0; |
+ int num_track_buffer_gap_warning_logs_ = 0; |
DISALLOW_COPY_AND_ASSIGN(SourceBufferStream); |
}; |