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 722b0606ad2f0067538b4d0aecaa9ac4cad8c3c3..84bfafb8b08b10cbbd719a57dedc7e8839bea169 100644 |
--- a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc |
+++ b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc |
@@ -377,17 +377,17 @@ 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) { |
+ // Parse QP. |
+ h264_bitstream_parser_.ParseBitstream(encoded_image_._buffer, |
+ encoded_image_._length); |
+ h264_bitstream_parser_.GetLastSliceQp(&encoded_image_.qp_); |
+ |
// Deliver encoded image. |
CodecSpecificInfo codec_specific; |
codec_specific.codecType = kVideoCodecH264; |
codec_specific.codecSpecific.H264.packetization_mode = packetization_mode_; |
encoded_image_callback_->OnEncodedImage(encoded_image_, &codec_specific, |
&frag_header); |
- |
- // Parse and report QP. |
- h264_bitstream_parser_.ParseBitstream(encoded_image_._buffer, |
- encoded_image_._length); |
- h264_bitstream_parser_.GetLastSliceQp(&encoded_image_.qp_); |
} |
return WEBRTC_VIDEO_CODEC_OK; |
} |