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

Unified Diff: media/filters/video_renderer_base.cc

Issue 10704175: Add config change support to FFmpegVideoDecoder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
Index: media/filters/video_renderer_base.cc
diff --git a/media/filters/video_renderer_base.cc b/media/filters/video_renderer_base.cc
index 8451201fae668bd916c1c86bb853bf48e6c9883b..640a7d755100a5863c44334e82dcde664e232489 100644
--- a/media/filters/video_renderer_base.cc
+++ b/media/filters/video_renderer_base.cc
@@ -284,13 +284,22 @@ void VideoRendererBase::ThreadMain() {
continue;
}
-
// Congratulations! You've made it past the video frame timing gauntlet.
//
// We can now safely update the current frame, request another frame, and
// signal to the client that a new frame is available.
DCHECK(!pending_paint_);
DCHECK(!ready_frames_.empty());
+
+ size_t new_width = ready_frames_.front()->natural_width();
+ size_t new_height = ready_frames_.front()->natural_height();
+
+ if (!current_frame_ ||
+ current_frame_->natural_width() != new_width ||
+ current_frame_->natural_height() != new_height) {
+ host_->SetNaturalVideoSize(gfx::Size(new_width, new_height));
+ }
+
current_frame_ = ready_frames_.front();
ready_frames_.pop_front();
AttemptRead_Locked();

Powered by Google App Engine
This is Rietveld 408576698