From f535217b5fc3d569ac2f18fd2a5177a85e934239 Mon Sep 17 00:00:00 2001 From: "michaeln@google.com" Date: Thu, 2 Jun 2011 03:15:28 +0000 Subject: Revert 87578 - Respect pixel aspect ratio of video if it contains one. BUG=18941 TEST=Check correct AR on http://people.xiph.org/~giles/2009/celt-aspect.html Alternately, fix 59412 and run media/video-display-aspect-ratio layout test Review URL: http://codereview.chromium.org/7086002 TBR=scottfr@chromium.org Review URL: http://codereview.chromium.org/7109002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87579 0039d316-1c4b-4281-b951-d872f2087c98 --- media/video/ffmpeg_video_decode_engine.cc | 4 ++-- media/video/ffmpeg_video_decode_engine_unittest.cc | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'media/video') diff --git a/media/video/ffmpeg_video_decode_engine.cc b/media/video/ffmpeg_video_decode_engine.cc index c1e1d63..0413092 100644 --- a/media/video/ffmpeg_video_decode_engine.cc +++ b/media/video/ffmpeg_video_decode_engine.cc @@ -117,8 +117,8 @@ void FFmpegVideoDecodeEngine::Initialize( info.provides_buffers = true; info.stream_info.surface_type = VideoFrame::TYPE_SYSTEM_MEMORY; info.stream_info.surface_format = GetSurfaceFormat(); - info.stream_info.surface_width = config.surface_width(); - info.stream_info.surface_height = config.surface_height(); + info.stream_info.surface_width = config.width(); + info.stream_info.surface_height = config.height(); // If we do not have enough buffers, we will report error too. bool buffer_allocated = true; diff --git a/media/video/ffmpeg_video_decode_engine_unittest.cc b/media/video/ffmpeg_video_decode_engine_unittest.cc index 2589289..8a53f6d 100644 --- a/media/video/ffmpeg_video_decode_engine_unittest.cc +++ b/media/video/ffmpeg_video_decode_engine_unittest.cc @@ -23,8 +23,6 @@ namespace media { static const int kWidth = 320; static const int kHeight = 240; -static const int kSurfaceWidth = 522; -static const int kSurfaceHeight = 288; static const AVRational kFrameRate = { 100, 1 }; static void InitializeFrame(uint8_t* data, int width, AVFrame* frame) { @@ -52,7 +50,7 @@ class FFmpegVideoDecodeEngineTest : public testing::Test, public VideoDecodeEngine::EventHandler { public: FFmpegVideoDecodeEngineTest() - : config_(kCodecH264, kWidth, kHeight, kSurfaceWidth, kSurfaceHeight, + : config_(kCodecH264, kWidth, kHeight, kFrameRate.num, kFrameRate.den, NULL, 0) { // Setup FFmpeg structures. -- cgit v1.1