diff options
author | vrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-23 18:30:54 +0000 |
---|---|---|
committer | vrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-23 18:30:54 +0000 |
commit | efa9aa8e051cd37223cbfb641462a7743aacacbb (patch) | |
tree | d582364f4a58407c4babb05fe5f8553452f1f601 /media | |
parent | 88d2338d3823744245e9f94ecd94ce4fb3eb97ae (diff) | |
download | chromium_src-efa9aa8e051cd37223cbfb641462a7743aacacbb.zip chromium_src-efa9aa8e051cd37223cbfb641462a7743aacacbb.tar.gz chromium_src-efa9aa8e051cd37223cbfb641462a7743aacacbb.tar.bz2 |
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
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97892 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/ffmpeg/ffmpeg_common.cc | 4 | ||||
-rw-r--r-- | media/video/ffmpeg_video_decode_engine.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc index d03715e..65ab9bb 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->coded_height; + return stream->codec->height; } int GetSurfaceWidth(AVStream* stream) { @@ -201,7 +201,7 @@ int GetSurfaceWidth(AVStream* stream) { else aspect_ratio = 1.0; - int width = floor(stream->codec->coded_width * aspect_ratio + 0.5); + int width = floor(stream->codec->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 0958516..ced1b60 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.width(), - config.height(), + config.surface_width(), + config.surface_height(), kNoTimestamp, kNoTimestamp); frame_queue_available_.push_back(video_frame); |