diff --git a/modules/video_coding/codecs/vp9/vp9_impl.cc b/modules/video_coding/codecs/vp9/vp9_impl.cc index 22993eb66a..7a779deb37 100644 --- a/modules/video_coding/codecs/vp9/vp9_impl.cc +++ b/modules/video_coding/codecs/vp9/vp9_impl.cc @@ -716,8 +716,10 @@ int VP9EncoderImpl::GetEncodedLayerFrame(const vpx_codec_cx_pkt* pkt) { encoded_image_.content_type_ = (codec_.mode == kScreensharing) ? VideoContentType::SCREENSHARE : VideoContentType::UNSPECIFIED; - encoded_image_._encodedHeight = raw_->d_h; - encoded_image_._encodedWidth = raw_->d_w; + encoded_image_._encodedHeight = + pkt->data.frame.height[layer_id.spatial_layer_id]; + encoded_image_._encodedWidth = + pkt->data.frame.width[layer_id.spatial_layer_id]; encoded_image_.timing_.flags = TimingFrameFlags::kInvalid; int qp = -1; vpx_codec_control(encoder_, VP8E_GET_LAST_QUANTIZER, &qp); diff --git a/video/send_statistics_proxy.cc b/video/send_statistics_proxy.cc index 4375e840c3..3c655cc43a 100644 --- a/video/send_statistics_proxy.cc +++ b/video/send_statistics_proxy.cc @@ -878,6 +878,7 @@ void SendStatisticsProxy::OnSendEncodedImage( if (!stats) return; + // TODO(ssilkin): Fix stats reporting for spatial layers in SVC. stats->width = encoded_image._encodedWidth; stats->height = encoded_image._encodedHeight; update_times_[ssrc].resolution_update_ms = clock_->TimeInMilliseconds();