| 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..2464d57a41705913d7c8e26d53982e9467694051 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(log_cb_, ERROR) << "Media segment did not begin with key frame.";
|
| return false;
|
| }
|
|
|
| @@ -231,15 +232,17 @@ bool SourceBufferStream::Append(const BufferQueue& buffers) {
|
|
|
| if (media_segment_start_time_ < DecodeTimestamp() ||
|
| buffers.front()->GetDecodeTimestamp() < DecodeTimestamp()) {
|
| - MEDIA_LOG(log_cb_)
|
| + MEDIA_LOG(log_cb_, ERROR)
|
| << "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(log_cb_, ERROR) << "Invalid same timestamp construct detected at"
|
| + << " time "
|
| + << dts.InSecondsF();
|
|
|
| return false;
|
| }
|
| @@ -509,16 +512,16 @@ bool SourceBufferStream::IsMonotonicallyIncreasing(
|
|
|
| if (prev_timestamp != kNoDecodeTimestamp()) {
|
| if (current_timestamp < prev_timestamp) {
|
| - MEDIA_LOG(log_cb_) << "Buffers were not monotonically increasing.";
|
| + MEDIA_LOG(log_cb_, ERROR) << "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(log_cb_, ERROR) << "Unexpected combination of buffers with"
|
| + << " the same timestamp detected at "
|
| + << current_timestamp.InSecondsF();
|
| return false;
|
| }
|
| }
|
| @@ -1233,12 +1236,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(log_cb_, ERROR) << "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(log_cb_, ERROR) << "Audio encryption changes not allowed.";
|
| return false;
|
| }
|
|
|
| @@ -1264,12 +1267,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(log_cb_, ERROR) << "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(log_cb_, ERROR) << "Video encryption changes not allowed.";
|
| return false;
|
| }
|
|
|
|
|