summaryrefslogtreecommitdiffstats
path: root/media/base/video_frame_impl_unittest.cc
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-04 20:16:10 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-04 20:16:10 +0000
commit80a609dc8bb5cdd53a0383f2f173d3e94257c5a6 (patch)
treee1ed6eec1977eceeda384bc49ebaf7fae64ba812 /media/base/video_frame_impl_unittest.cc
parente116a526fce847f7d19a0576d30b3e8de812d923 (diff)
downloadchromium_src-80a609dc8bb5cdd53a0383f2f173d3e94257c5a6.zip
chromium_src-80a609dc8bb5cdd53a0383f2f173d3e94257c5a6.tar.gz
chromium_src-80a609dc8bb5cdd53a0383f2f173d3e94257c5a6.tar.bz2
Handle end of stream for media
When FFmpegDemuxer failed to decode a raw packet, the signal of end of stream should bubble up to the renderers. It is done in this CL by creating fake buffers. This change also fixes a bug with video of only 1 frame. Review URL: http://codereview.chromium.org/113611 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17656 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/video_frame_impl_unittest.cc')
-rw-r--r--media/base/video_frame_impl_unittest.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/media/base/video_frame_impl_unittest.cc b/media/base/video_frame_impl_unittest.cc
index c674460..fe0d37c 100644
--- a/media/base/video_frame_impl_unittest.cc
+++ b/media/base/video_frame_impl_unittest.cc
@@ -91,9 +91,6 @@ TEST(VideoFrameImpl, Basic) {
frame->SetDuration(kDurationB);
EXPECT_TRUE(kTimestampB == frame->GetTimestamp());
EXPECT_TRUE(kDurationB == frame->GetDuration());
- frame->SetEndOfStream(true);
- EXPECT_TRUE(frame->IsEndOfStream());
- frame->SetEndOfStream(false);
EXPECT_FALSE(frame->IsEndOfStream());
frame->SetDiscontinuous(true);
EXPECT_TRUE(frame->IsDiscontinuous());
@@ -105,4 +102,8 @@ TEST(VideoFrameImpl, Basic) {
ExpectFrameColor(frame, 0xFF000000);
media::MockVideoDecoder::InitializeYV12Frame(frame, 1.0f);
ExpectFrameColor(frame, 0xFFFFFFFF);
+
+ // Test an empty frame.
+ media::VideoFrameImpl::CreateEmptyFrame(&frame);
+ EXPECT_TRUE(frame->IsEndOfStream());
}