void DecoderStream<StreamType>::OnDecoderSelected(
scoped_ptr<Decoder> selected_decoder,
scoped_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream) {
- FUNCTION_DVLOG(2);
+ FUNCTION_DVLOG(2) << ": "
+ << (selected_decoder ? selected_decoder->GetDisplayName()
+ : "No decoder selected.");
DCHECK(task_runner_->BelongsToCurrentThread());
DCHECK_EQ(state_, STATE_INITIALIZING) << state_;
DCHECK(!init_cb_.is_null());
void DecoderStream<StreamType>::OnDecodeDone(int buffer_size,
bool end_of_stream,
typename Decoder::Status status) {
- FUNCTION_DVLOG(2) << status;
+ FUNCTION_DVLOG(2) << ": " << status;
DCHECK(state_ == STATE_NORMAL || state_ == STATE_FLUSHING_DECODER ||
state_ == STATE_PENDING_DEMUXER_READ || state_ == STATE_ERROR)
<< state_;
TRACE_EVENT_ASYNC_END0("media", GetTraceString<StreamType>(), this);
- if (end_of_stream)
+ if (end_of_stream) {
+ DCHECK(!pending_decode_requests_);
decoding_eos_ = false;
+ }
if (state_ == STATE_ERROR) {
DCHECK(read_cb_.is_null());