Index: webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc |
diff --git a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc |
index 2fbceb1d7904b8a5ff7714a30fcce6afe1bf9266..cb6102128f1d0f7b60d548254e1853f504a72aee 100644 |
--- a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc |
+++ b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc |
@@ -1145,7 +1145,9 @@ int VP8DecoderImpl::Decode(const EncodedImage& input_image, |
} |
img = vpx_codec_get_frame(decoder_, &iter); |
- ret = ReturnFrame(img, input_image._timeStamp, input_image.ntp_time_ms_); |
+ int qp; |
+ vpx_codec_control(decoder_, VPXD_GET_LAST_QUANTIZER, &qp); |
sakal
2017/02/16 12:44:49
This method can return failure in theory. However,
|
+ ret = ReturnFrame(img, input_image._timeStamp, input_image.ntp_time_ms_, qp); |
if (ret != 0) { |
// Reset to avoid requesting key frames too often. |
if (ret < 0 && propagation_cnt_ > 0) |
@@ -1205,7 +1207,8 @@ int VP8DecoderImpl::Decode(const EncodedImage& input_image, |
int VP8DecoderImpl::ReturnFrame(const vpx_image_t* img, |
uint32_t timestamp, |
- int64_t ntp_time_ms) { |
+ int64_t ntp_time_ms, |
+ int qp) { |
if (img == NULL) { |
// Decoder OK and NULL image => No show frame |
return WEBRTC_VIDEO_CODEC_NO_OUTPUT; |
@@ -1232,9 +1235,8 @@ int VP8DecoderImpl::ReturnFrame(const vpx_image_t* img, |
VideoFrame decoded_image(buffer, timestamp, 0, kVideoRotation_0); |
decoded_image.set_ntp_time_ms(ntp_time_ms); |
- int ret = decode_complete_callback_->Decoded(decoded_image); |
- if (ret != 0) |
- return ret; |
+ decode_complete_callback_->Decoded(decoded_image, rtc::Optional<int32_t>(), |
+ rtc::Optional<uint8_t>(qp)); |
// Remember image format for later |
image_format_ = img->fmt; |