| Index: webrtc/media/base/videoframefactory.cc
|
| diff --git a/webrtc/media/base/videoframefactory.cc b/webrtc/media/base/videoframefactory.cc
|
| index 0a7dfc22d494a674c70899e425dc7ce1d55acc43..70b57faff7beda42be26c0aaaffffc24bb38d18f 100644
|
| --- a/webrtc/media/base/videoframefactory.cc
|
| +++ b/webrtc/media/base/videoframefactory.cc
|
| @@ -39,13 +39,13 @@ VideoFrame* VideoFrameFactory::CreateAliasedFrame(
|
| std::swap(output_width, output_height);
|
| }
|
|
|
| - std::unique_ptr<VideoFrame> output_frame(new WebRtcVideoFrame(
|
| - pool_.CreateBuffer(output_width, output_height),
|
| - cropped_input_frame->rotation(),
|
| - cropped_input_frame->timestamp_us()));
|
| + rtc::scoped_refptr<webrtc::I420Buffer> scaled =
|
| + pool_.CreateBuffer(output_width, output_height);
|
| + webrtc::I420Buffer::CenterCropAndScale(
|
| + scaled, cropped_input_frame->video_frame_buffer());
|
|
|
| - cropped_input_frame->StretchToFrame(output_frame.get(), true, true);
|
| - return output_frame.release();
|
| + return new WebRtcVideoFrame(scaled, cropped_input_frame->rotation(),
|
| + cropped_input_frame->timestamp_us());
|
| }
|
|
|
| } // namespace cricket
|
|
|