Index: webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc |
diff --git a/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc |
index be9ae010ecd89dae5532841dc8bc106e1d03d332..6cecb2cf01c24e512ee93889a7c549aec8ca0a8e 100644 |
--- a/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc |
+++ b/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc |
@@ -370,13 +370,12 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image, |
// without copying the underlying buffer. |
if (av_frame_->width != i420_buffer->width() || |
av_frame_->height != i420_buffer->height()) { |
- rtc::scoped_refptr<VideoFrameBuffer> cropped_buf( |
- new rtc::RefCountedObject<WrappedI420Buffer>( |
- av_frame_->width, av_frame_->height, |
- i420_buffer->DataY(), i420_buffer->StrideY(), |
- i420_buffer->DataU(), i420_buffer->StrideU(), |
- i420_buffer->DataV(), i420_buffer->StrideV(), |
- rtc::KeepRefUntilDone(i420_buffer))); |
+ rtc::scoped_refptr<VideoFrameBuffer> cropped_buf(WrapI420Buffer( |
+ av_frame_->width, av_frame_->height, |
+ i420_buffer->DataY(), i420_buffer->StrideY(), |
+ i420_buffer->DataU(), i420_buffer->StrideU(), |
+ i420_buffer->DataV(), i420_buffer->StrideV(), |
+ rtc::KeepRefUntilDone(i420_buffer))); |
VideoFrame cropped_frame( |
cropped_buf, video_frame->timestamp(), video_frame->render_time_ms(), |
video_frame->rotation()); |