Chromium Code Reviews| Index: media/filters/source_buffer_stream.cc |
| diff --git a/media/filters/source_buffer_stream.cc b/media/filters/source_buffer_stream.cc |
| index 67b7245afb44680c1be7b50f72496afb429ebab6..82075c61435a95a1a0524834760d6cba8fb70ca5 100644 |
| --- a/media/filters/source_buffer_stream.cc |
| +++ b/media/filters/source_buffer_stream.cc |
| @@ -958,17 +958,33 @@ void SourceBufferStream::OnSetDuration(base::TimeDelta duration) { |
| SourceBufferStream::Status SourceBufferStream::GetNextBuffer( |
| scoped_refptr<StreamParserBuffer>* out_buffer) { |
| + DVLOG(2) << __FUNCTION__ << " " << GetStreamTypeName(); |
| if (!pending_buffer_.get()) { |
| const SourceBufferStream::Status status = GetNextBufferInternal(out_buffer); |
| - if (status != SourceBufferStream::kSuccess || !SetPendingBuffer(out_buffer)) |
| + if (status != SourceBufferStream::kSuccess || |
| + !SetPendingBuffer(out_buffer)) { |
| + DVLOG(2) << __FUNCTION__ << " " << GetStreamTypeName() |
| + << ": no previously pending buffer, returning status " << status; |
|
wolenetz
2014/12/05 22:13:43
Updated the message for clarity. Still a little gr
|
| return status; |
| + } |
| } |
| - if (!pending_buffer_->splice_buffers().empty()) |
| - return HandleNextBufferWithSplice(out_buffer); |
| + if (!pending_buffer_->splice_buffers().empty()) { |
| + const SourceBufferStream::Status status = |
| + HandleNextBufferWithSplice(out_buffer); |
| + DVLOG(2) << __FUNCTION__ << " " << GetStreamTypeName() |
| + << ": handled next buffer with splice, returning status " |
| + << status; |
| + return status; |
| + } |
| + const SourceBufferStream::Status status = |
| + HandleNextBufferWithPreroll(out_buffer); |
| DCHECK(pending_buffer_->preroll_buffer().get()); |
|
wolenetz
2014/12/05 22:13:43
Oops - this DCHECK must be done *before* HandleNex
|
| - return HandleNextBufferWithPreroll(out_buffer); |
| + DVLOG(2) << __FUNCTION__ << " " << GetStreamTypeName() |
| + << ": handled next buffer with preroll, returning status " |
| + << status; |
| + return status; |
| } |
| SourceBufferStream::Status SourceBufferStream::HandleNextBufferWithSplice( |