diff options
author | scottfr@chromium.org <scottfr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-02 03:01:07 +0000 |
---|---|---|
committer | scottfr@chromium.org <scottfr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-02 03:01:07 +0000 |
commit | f649bf548e4cbc6bfa0ab853ea2b0a9d8183fa2b (patch) | |
tree | da830829da42937075575e9140803f66578921b5 /media/video | |
parent | 32d017b5eae0c4b39370f57b09a6395b468ad6ef (diff) | |
download | chromium_src-f649bf548e4cbc6bfa0ab853ea2b0a9d8183fa2b.zip chromium_src-f649bf548e4cbc6bfa0ab853ea2b0a9d8183fa2b.tar.gz chromium_src-f649bf548e4cbc6bfa0ab853ea2b0a9d8183fa2b.tar.bz2 |
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
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87578 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/video')
-rw-r--r-- | media/video/ffmpeg_video_decode_engine.cc | 4 | ||||
-rw-r--r-- | media/video/ffmpeg_video_decode_engine_unittest.cc | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/media/video/ffmpeg_video_decode_engine.cc b/media/video/ffmpeg_video_decode_engine.cc index 0413092..c1e1d63 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.width(); - info.stream_info.surface_height = config.height(); + info.stream_info.surface_width = config.surface_width(); + info.stream_info.surface_height = config.surface_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 8a53f6d..2589289 100644 --- a/media/video/ffmpeg_video_decode_engine_unittest.cc +++ b/media/video/ffmpeg_video_decode_engine_unittest.cc @@ -23,6 +23,8 @@ 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) { @@ -50,7 +52,7 @@ class FFmpegVideoDecodeEngineTest : public testing::Test, public VideoDecodeEngine::EventHandler { public: FFmpegVideoDecodeEngineTest() - : config_(kCodecH264, kWidth, kHeight, + : config_(kCodecH264, kWidth, kHeight, kSurfaceWidth, kSurfaceHeight, kFrameRate.num, kFrameRate.den, NULL, 0) { // Setup FFmpeg structures. |