summaryrefslogtreecommitdiffstats
path: root/media/cast/receiver/video_decoder.cc
diff options
context:
space:
mode:
authorxjz <xjz@chromium.org>2016-02-04 17:15:15 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-05 01:16:19 +0000
commit2f107ccec2a3f32f80fbc50a0bc6684cb58a4eeb (patch)
treeaee45c0d7a0b3000bf7e4406213ac4fff9db1be4 /media/cast/receiver/video_decoder.cc
parent51b332bd331638c6ae8a176fe99de9a7f7e5b657 (diff)
downloadchromium_src-2f107ccec2a3f32f80fbc50a0bc6684cb58a4eeb.zip
chromium_src-2f107ccec2a3f32f80fbc50a0bc6684cb58a4eeb.tar.gz
chromium_src-2f107ccec2a3f32f80fbc50a0bc6684cb58a4eeb.tar.bz2
Set timestamps to decoded video frames in cast receiver as
VideoResourceUpdater uses timestamp to check if an old frame can be reused. BUG=581480 Review URL: https://codereview.chromium.org/1670793002 Cr-Commit-Position: refs/heads/master@{#373702}
Diffstat (limited to 'media/cast/receiver/video_decoder.cc')
-rw-r--r--media/cast/receiver/video_decoder.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/media/cast/receiver/video_decoder.cc b/media/cast/receiver/video_decoder.cc
index ef512c4..9983c1f 100644
--- a/media/cast/receiver/video_decoder.cc
+++ b/media/cast/receiver/video_decoder.cc
@@ -66,6 +66,8 @@ class VideoDecoder::ImplBase
const scoped_refptr<VideoFrame> decoded_frame = Decode(
encoded_frame->mutable_bytes(),
static_cast<int>(encoded_frame->data.size()));
+ decoded_frame->set_timestamp(
+ encoded_frame->rtp_timestamp.ToTimeDelta(kVideoFrequency));
scoped_ptr<FrameEvent> decode_event(new FrameEvent());
decode_event->timestamp = cast_environment_->Clock()->NowTicks();