| Index: webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
|
| diff --git a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
|
| index 5c0aa1bd4507206de1cf3277c3f282438d3dc623..a7c7a9db686ed51903f5e8bdf83d4c89acbaddf7 100644
|
| --- a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
|
| +++ b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
|
| @@ -374,18 +374,20 @@ int32_t H264EncoderImpl::Encode(const VideoFrame& input_frame,
|
| // Encoder can skip frames to save bandwidth in which case
|
| // |encoded_image_._length| == 0.
|
| if (encoded_image_._length > 0) {
|
| - // Deliver encoded image.
|
| - CodecSpecificInfo codec_specific;
|
| - codec_specific.codecType = kVideoCodecH264;
|
| - encoded_image_callback_->OnEncodedImage(encoded_image_, &codec_specific,
|
| - &frag_header);
|
| -
|
| // Parse and report QP.
|
| h264_bitstream_parser_.ParseBitstream(encoded_image_._buffer,
|
| encoded_image_._length);
|
| int qp = -1;
|
| - if (h264_bitstream_parser_.GetLastSliceQp(&qp))
|
| + if (h264_bitstream_parser_.GetLastSliceQp(&qp)) {
|
| quality_scaler_.ReportQP(qp);
|
| + encoded_image_.qp_ = qp;
|
| + }
|
| +
|
| + // Deliver encoded image.
|
| + CodecSpecificInfo codec_specific;
|
| + codec_specific.codecType = kVideoCodecH264;
|
| + encoded_image_callback_->OnEncodedImage(encoded_image_, &codec_specific,
|
| + &frag_header);
|
| } else {
|
| quality_scaler_.ReportDroppedFrame();
|
| }
|
|
|