Avoid log spam when decoder implementation changes

A refactoring (https://webrtc-review.googlesource.com/c/src/+/196520)
of decoder metadata handling introduced a bug which causes us to log an
info-level entry for every frame decoded if the implementation changes
during runtime (e.g. due to software fallback).

This CL fixes that to avoid spamming the logs.

Bug: webrtc:12271
Change-Id: I89016351b8752b259299c4cf56c6feddcca43460
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211664
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33451}
This commit is contained in:
Erik Språng
2021-03-12 16:36:49 +01:00
committed by Commit Bot
parent 5eda59c96f
commit c80f955114

View File

@ -272,7 +272,7 @@ int32_t VCMGenericDecoder::Decode(const VCMEncodedFrame& frame, Timestamp now) {
if (decoder_info != decoder_info_) {
RTC_LOG(LS_INFO) << "Changed decoder implementation to: "
<< decoder_info.ToString();
decoder_info_ = decoder_info;
_callback->OnDecoderImplementationName(
decoder_info.implementation_name.empty()
? "unknown"