summaryrefslogtreecommitdiff
path: root/media/cast/video_receiver
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2013-10-31 11:16:26 +0000
committerTorne (Richard Coles) <torne@google.com>2013-10-31 11:16:26 +0000
commit1e9bf3e0803691d0a228da41fc608347b6db4340 (patch)
treeab2e5565f71b4219b3da406e19f16fe306704ef5 /media/cast/video_receiver
parentf10b58d5bc6ae3e74076fc4ccca14cbc57ef805c (diff)
downloadchromium_org-1e9bf3e0803691d0a228da41fc608347b6db4340.tar.gz
Merge from Chromium at DEPS revision 232015
This commit was generated by merge_to_master.py. Change-Id: If86767ad396b9e2e1a4c1e9df1427daea29703ef
Diffstat (limited to 'media/cast/video_receiver')
-rw-r--r--media/cast/video_receiver/codecs/vp8/vp8_decoder.cc5
-rw-r--r--media/cast/video_receiver/video_decoder_unittest.cc6
2 files changed, 7 insertions, 4 deletions
diff --git a/media/cast/video_receiver/codecs/vp8/vp8_decoder.cc b/media/cast/video_receiver/codecs/vp8/vp8_decoder.cc
index 23125b2057..26113cd3d6 100644
--- a/media/cast/video_receiver/codecs/vp8/vp8_decoder.cc
+++ b/media/cast/video_receiver/codecs/vp8/vp8_decoder.cc
@@ -64,14 +64,15 @@ bool Vp8Decoder::Decode(const EncodedVideoFrame& input_image,
decoded_frame->y_plane.length);
decoded_frame->u_plane.stride = img->stride[VPX_PLANE_U];
- decoded_frame->u_plane.length = img->stride[VPX_PLANE_U] * img->d_h;
+ decoded_frame->u_plane.length = img->stride[VPX_PLANE_U] * (img->d_h + 1) / 2;
decoded_frame->u_plane.data = new uint8[decoded_frame->u_plane.length];
memcpy(decoded_frame->u_plane.data, img->planes[VPX_PLANE_U],
decoded_frame->u_plane.length);
decoded_frame->v_plane.stride = img->stride[VPX_PLANE_V];
- decoded_frame->v_plane.length = img->stride[VPX_PLANE_V] * img->d_h;
+ decoded_frame->v_plane.length = img->stride[VPX_PLANE_V] * (img->d_h + 1) / 2;
decoded_frame->v_plane.data = new uint8[decoded_frame->v_plane.length];
+
memcpy(decoded_frame->v_plane.data, img->planes[VPX_PLANE_V],
decoded_frame->v_plane.length);
diff --git a/media/cast/video_receiver/video_decoder_unittest.cc b/media/cast/video_receiver/video_decoder_unittest.cc
index 77f3efdefa..cb40e12752 100644
--- a/media/cast/video_receiver/video_decoder_unittest.cc
+++ b/media/cast/video_receiver/video_decoder_unittest.cc
@@ -30,7 +30,8 @@ class VideoDecoderTest : public ::testing::Test {
VideoReceiverConfig config_;
};
-TEST_F(VideoDecoderTest, SizeZero) {
+// TODO(pwestin): EXPECT_DEATH tests can not pass valgrind.
+TEST_F(VideoDecoderTest, DISABLED_SizeZero) {
EncodedVideoFrame encoded_frame;
I420VideoFrame video_frame;
base::TimeTicks render_time;
@@ -41,7 +42,8 @@ TEST_F(VideoDecoderTest, SizeZero) {
"Empty video frame");
}
-TEST_F(VideoDecoderTest, InvalidCodec) {
+// TODO(pwestin): EXPECT_DEATH tests can not pass valgrind.
+TEST_F(VideoDecoderTest, DISABLED_InvalidCodec) {
EncodedVideoFrame encoded_frame;
I420VideoFrame video_frame;
base::TimeTicks render_time;