Commit 5be8506d authored by Xiaohan Wang's avatar Xiaohan Wang Committed by Commit Bot

media: Add MediaLog on DecoderStream fallback after initial decode error

Fallback to new decoder after initial decode error is an important event
to understand what is happening in the media pipeline. This CL adds a
MEDIA_ERROR(WARNING) for this case.

Bug: 1020245
Change-Id: Ia1e8948c3aa0f80b7d16f5ca48dae69e27f93a1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1893521
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: default avatarFrank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711464}
parent dd00101b
......@@ -543,19 +543,22 @@ void DecoderStream<StreamType>::OnDecodeDone(
// from being called back.
fallback_weak_factory_.InvalidateWeakPtrs();
FUNCTION_DVLOG(1)
<< ": Falling back to new decoder after initial decode error.";
std::string fallback_message =
GetStreamTypeString() +
" fallback to new decoder after initial decode error.";
FUNCTION_DVLOG(1) << ": " << fallback_message;
MEDIA_LOG(WARNING, media_log_) << fallback_message;
state_ = STATE_REINITIALIZING_DECODER;
SelectDecoder();
return;
}
FUNCTION_DVLOG(1) << ": Decode error!";
} else {
std::string error_message = GetStreamTypeString() + " decode error!";
FUNCTION_DVLOG(1) << ": " << error_message;
MEDIA_LOG(ERROR, media_log_) << error_message;
state_ = STATE_ERROR;
MEDIA_LOG(ERROR, media_log_) << GetStreamTypeString() << " decode error";
ClearOutputs();
if (read_cb_)
SatisfyRead(DECODE_ERROR, nullptr);
}
return;
case DecodeStatus::ABORTED:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment