summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorvrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-23 18:56:13 +0000
committervrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-23 18:56:13 +0000
commit08cc065ecef2a8c8e66c9aae8a28371de4512de0 (patch)
treed8fd51d40d12f4c451e1dcfb5b5261a302e03e6d /media
parent0e0bbb14a9751de19c3ac543c041c9df68890afb (diff)
downloadchromium_src-08cc065ecef2a8c8e66c9aae8a28371de4512de0.zip
chromium_src-08cc065ecef2a8c8e66c9aae8a28371de4512de0.tar.gz
chromium_src-08cc065ecef2a8c8e66c9aae8a28371de4512de0.tar.bz2
Revert 97892 - Use surface_width/height instead of coded_width/coded_height for VideoFrame size
It appears that "surface" height/width refers to the visible height/width of the frame. FFmpegVideoDecodeEngine should use these dimensions to create VideoFrames rather than the coded width/height. BUG=91506 TEST=NONE Review URL: http://codereview.chromium.org/7624055 TBR=vrk@google.com Review URL: http://codereview.chromium.org/7719005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97895 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/ffmpeg/ffmpeg_common.cc4
-rw-r--r--media/video/ffmpeg_video_decode_engine.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index 65ab9bb..d03715e 100644
--- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc
@@ -188,7 +188,7 @@ bool GetStreamByteCountOverRange(AVStream* stream,
}
int GetSurfaceHeight(AVStream* stream) {
- return stream->codec->height;
+ return stream->codec->coded_height;
}
int GetSurfaceWidth(AVStream* stream) {
@@ -201,7 +201,7 @@ int GetSurfaceWidth(AVStream* stream) {
else
aspect_ratio = 1.0;
- int width = floor(stream->codec->width * aspect_ratio + 0.5);
+ int width = floor(stream->codec->coded_width * aspect_ratio + 0.5);
// An even width makes things easier for YV12 and appears to be the behavior
// expected by WebKit layout tests.
diff --git a/media/video/ffmpeg_video_decode_engine.cc b/media/video/ffmpeg_video_decode_engine.cc
index ced1b60..0958516 100644
--- a/media/video/ffmpeg_video_decode_engine.cc
+++ b/media/video/ffmpeg_video_decode_engine.cc
@@ -114,8 +114,8 @@ void FFmpegVideoDecodeEngine::Initialize(
for (size_t i = 0; i < Limits::kMaxVideoFrames; ++i) {
scoped_refptr<VideoFrame> video_frame =
VideoFrame::CreateFrame(VideoFrame::YV12,
- config.surface_width(),
- config.surface_height(),
+ config.width(),
+ config.height(),
kNoTimestamp,
kNoTimestamp);
frame_queue_available_.push_back(video_frame);