Properly report number of quality downscales in stats.

A regression was introduced in 876222f that caused these stats to
be reported incorrectly. This used to be only implemented for VP8
but should now be available for all codecs.

BUG=webrtc:6860

Review-Url: https://codereview.webrtc.org/2564373002
Cr-Commit-Position: refs/heads/master@{#15673}
This commit is contained in:
kthelgason
2016-12-19 05:04:40 -08:00
committed by Commit bot
parent df6075a77f
commit 0c8c538835
7 changed files with 65 additions and 49 deletions

View File

@ -466,7 +466,7 @@ bool SimulcastEncoderAdapter::SupportsNativeHandle() const {
VideoEncoder::ScalingSettings SimulcastEncoderAdapter::GetScalingSettings()
const {
// Turn off quality scaling for simulcast.
if (NumberOfStreams(codec_) != 1)
if (!Initialized() || NumberOfStreams(codec_) != 1)
return VideoEncoder::ScalingSettings(false);
return streaminfos_[0].encoder->GetScalingSettings();
}