Index: media/filters/source_buffer_stream.cc |
diff --git a/media/filters/source_buffer_stream.cc b/media/filters/source_buffer_stream.cc |
index ee1abaf733334bd537e4bbb6b13190ca0b9d37c6..31810f76a5335fc9ff1eef5632cd8e3fd41a7752 100644 |
--- a/media/filters/source_buffer_stream.cc |
+++ b/media/filters/source_buffer_stream.cc |
@@ -220,8 +220,9 @@ bool SourceBufferStream::Append(const BufferQueue& buffers) { |
<< buffers.back()->duration().InSecondsF() << ")]"; |
// New media segments must begin with a keyframe. |
+ // TODO(wolenetz): Relax this requirement. See http://crbug.com/229412. |
if (new_media_segment_ && !buffers.front()->is_key_frame()) { |
- MEDIA_LOG(log_cb_) << "Media segment did not begin with key frame."; |
+ MEDIA_LOG(ERROR, log_cb_) << "Media segment did not begin with key frame."; |
return false; |
} |
@@ -231,15 +232,16 @@ bool SourceBufferStream::Append(const BufferQueue& buffers) { |
if (media_segment_start_time_ < DecodeTimestamp() || |
buffers.front()->GetDecodeTimestamp() < DecodeTimestamp()) { |
- MEDIA_LOG(log_cb_) |
+ MEDIA_LOG(ERROR, log_cb_) |
<< "Cannot append a media segment with negative timestamps."; |
return false; |
} |
if (!IsNextTimestampValid(buffers.front()->GetDecodeTimestamp(), |
buffers.front()->is_key_frame())) { |
- MEDIA_LOG(log_cb_) << "Invalid same timestamp construct detected at time " |
- << buffers.front()->GetDecodeTimestamp().InSecondsF(); |
+ const DecodeTimestamp& dts = buffers.front()->GetDecodeTimestamp(); |
+ MEDIA_LOG(ERROR, log_cb_) << "Invalid same timestamp construct detected at" |
+ << " time " << dts.InSecondsF(); |
return false; |
} |
@@ -509,16 +511,16 @@ bool SourceBufferStream::IsMonotonicallyIncreasing( |
if (prev_timestamp != kNoDecodeTimestamp()) { |
if (current_timestamp < prev_timestamp) { |
- MEDIA_LOG(log_cb_) << "Buffers were not monotonically increasing."; |
+ MEDIA_LOG(ERROR, log_cb_) << "Buffers did not monotonically increase."; |
return false; |
} |
if (current_timestamp == prev_timestamp && |
!SourceBufferRange::AllowSameTimestamp(prev_is_keyframe, |
current_is_keyframe)) { |
- MEDIA_LOG(log_cb_) << "Unexpected combination of buffers with the" |
- << " same timestamp detected at " |
- << current_timestamp.InSecondsF(); |
+ MEDIA_LOG(ERROR, log_cb_) << "Unexpected combination of buffers with" |
+ << " the same timestamp detected at " |
+ << current_timestamp.InSecondsF(); |
return false; |
} |
} |
@@ -1233,12 +1235,12 @@ bool SourceBufferStream::UpdateAudioConfig(const AudioDecoderConfig& config) { |
DVLOG(3) << "UpdateAudioConfig."; |
if (audio_configs_[0].codec() != config.codec()) { |
- MEDIA_LOG(log_cb_) << "Audio codec changes not allowed."; |
+ MEDIA_LOG(ERROR, log_cb_) << "Audio codec changes not allowed."; |
return false; |
} |
if (audio_configs_[0].is_encrypted() != config.is_encrypted()) { |
- MEDIA_LOG(log_cb_) << "Audio encryption changes not allowed."; |
+ MEDIA_LOG(ERROR, log_cb_) << "Audio encryption changes not allowed."; |
return false; |
} |
@@ -1264,12 +1266,12 @@ bool SourceBufferStream::UpdateVideoConfig(const VideoDecoderConfig& config) { |
DVLOG(3) << "UpdateVideoConfig."; |
if (video_configs_[0].codec() != config.codec()) { |
- MEDIA_LOG(log_cb_) << "Video codec changes not allowed."; |
+ MEDIA_LOG(ERROR, log_cb_) << "Video codec changes not allowed."; |
return false; |
} |
if (video_configs_[0].is_encrypted() != config.is_encrypted()) { |
- MEDIA_LOG(log_cb_) << "Video encryption changes not allowed."; |
+ MEDIA_LOG(ERROR, log_cb_) << "Video encryption changes not allowed."; |
return false; |
} |