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

Unified Diff: media/base/video_frame_unittest.cc

Issue 189513004: Make sure natural_size is set when a frame is cropped. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed DCHECK of natural size since the decoder pipeline do not abey. Created 6 years, 9 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/base/video_frame_pool.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame_unittest.cc
diff --git a/media/base/video_frame_unittest.cc b/media/base/video_frame_unittest.cc
index 271610d838a761590641e411b606a8c5668d2dae..967d37653c49ef469f1fd841fd45c3547635447d 100644
--- a/media/base/video_frame_unittest.cc
+++ b/media/base/video_frame_unittest.cc
@@ -217,8 +217,9 @@ TEST(VideoFrame, WrapVideoFrame) {
ASSERT_TRUE(wrapped_frame.get());
gfx::Rect visible_rect(1, 1, 1, 1);
+ gfx::Size natural_size = visible_rect.size();
frame = media::VideoFrame::WrapVideoFrame(
- wrapped_frame, visible_rect,
+ wrapped_frame, visible_rect, natural_size,
base::Bind(&FrameNoLongerNeededCallback, wrapped_frame,
&no_longer_needed_triggered));
EXPECT_EQ(wrapped_frame->coded_size(), frame->coded_size());
@@ -226,6 +227,8 @@ TEST(VideoFrame, WrapVideoFrame) {
frame->data(media::VideoFrame::kYPlane));
EXPECT_NE(wrapped_frame->visible_rect(), frame->visible_rect());
EXPECT_EQ(visible_rect, frame->visible_rect());
+ EXPECT_NE(wrapped_frame->natural_size(), frame->natural_size());
+ EXPECT_EQ(natural_size, frame->natural_size());
}
EXPECT_FALSE(no_longer_needed_triggered);
« no previous file with comments | « media/base/video_frame_pool.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698