| Index: media/filters/ffmpeg_video_decoder.cc
|
| diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
|
| index c2d34c28d0b77d57d31f5a8121c75ca587c6ef7e..159ace648e13c27ef93a49b10a574dce143f3008 100644
|
| --- a/media/filters/ffmpeg_video_decoder.cc
|
| +++ b/media/filters/ffmpeg_video_decoder.cc
|
| @@ -81,8 +81,15 @@ int FFmpegVideoDecoder::GetVideoBuffer(AVCodecContext* codec_context,
|
| if ((ret = av_image_check_size(width, height, 0, NULL)) < 0)
|
| return ret;
|
|
|
| + gfx::Size natural_size = natural_size_;
|
| + if (codec_context->sample_aspect_ratio.num > 0) {
|
| + natural_size = GetNaturalSize(gfx::Size(width, height),
|
| + codec_context->sample_aspect_ratio.num,
|
| + codec_context->sample_aspect_ratio.den);
|
| + }
|
| scoped_refptr<VideoFrame> video_frame =
|
| - VideoFrame::CreateFrame(format, width, height, kNoTimestamp());
|
| + VideoFrame::CreateFrame(format, width, height, natural_size,
|
| + kNoTimestamp());
|
|
|
| for (int i = 0; i < 3; i++) {
|
| frame->base[i] = video_frame->data(i);
|
| @@ -243,10 +250,6 @@ void FFmpegVideoDecoder::DoStop() {
|
| base::ResetAndReturn(&stop_cb_).Run();
|
| }
|
|
|
| -const gfx::Size& FFmpegVideoDecoder::natural_size() {
|
| - return natural_size_;
|
| -}
|
| -
|
| void FFmpegVideoDecoder::set_decryptor(Decryptor* decryptor) {
|
| DCHECK_EQ(state_, kUninitialized);
|
| decryptor_ = decryptor;
|
|
|