Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Unified Diff: media/video/ffmpeg_video_decode_engine.cc

Issue 7932005: Reland r101418: Fix aspect ratio and clarify video frame dimensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/tools/player_x11/x11_video_renderer.cc ('k') | media/video/ffmpeg_video_decode_engine_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/ffmpeg_video_decode_engine.cc
diff --git a/media/video/ffmpeg_video_decode_engine.cc b/media/video/ffmpeg_video_decode_engine.cc
index ced1b60bd25b51a577fbff6b01d3b20bb33e89f5..65edc2fc2d4a8dd6af8c789824e7096c72239231 100644
--- a/media/video/ffmpeg_video_decode_engine.cc
+++ b/media/video/ffmpeg_video_decode_engine.cc
@@ -61,8 +61,8 @@ void FFmpegVideoDecodeEngine::Initialize(
codec_context_->pix_fmt = PIX_FMT_YUV420P;
codec_context_->codec_type = AVMEDIA_TYPE_VIDEO;
codec_context_->codec_id = VideoCodecToCodecID(config.codec());
- codec_context_->coded_width = config.width();
- codec_context_->coded_height = config.height();
+ codec_context_->coded_width = config.coded_size().width();
+ codec_context_->coded_height = config.coded_size().height();
frame_rate_numerator_ = config.frame_rate_numerator();
frame_rate_denominator_ = config.frame_rate_denominator();
@@ -104,8 +104,7 @@ void FFmpegVideoDecodeEngine::Initialize(
av_frame_.reset(avcodec_alloc_frame());
VideoCodecInfo info;
info.success = false;
- info.surface_width = config.surface_width();
- info.surface_height = config.surface_height();
+ info.natural_size = config.natural_size();
// If we do not have enough buffers, we will report error too.
frame_queue_available_.clear();
@@ -114,8 +113,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.visible_rect().width(),
+ config.visible_rect().height(),
kNoTimestamp,
kNoTimestamp);
frame_queue_available_.push_back(video_frame);
« no previous file with comments | « media/tools/player_x11/x11_video_renderer.cc ('k') | media/video/ffmpeg_video_decode_engine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698