Index: media/cast/receiver/frame_receiver.cc |
diff --git a/media/cast/receiver/frame_receiver.cc b/media/cast/receiver/frame_receiver.cc |
index 1f6d75ed9b697b86ca5cc485c5afec5f58c5d4b6..8deb6d2c7bc53b7348923022e9e170e3e4a299ff 100644 |
--- a/media/cast/receiver/frame_receiver.cc |
+++ b/media/cast/receiver/frame_receiver.cc |
@@ -217,9 +217,10 @@ void FrameReceiver::EmitAvailableEncodedFrames() { |
// skipping one or more frames. Skip if the missing frame wouldn't complete |
// playing before the start of playback of the available frame. |
if (!is_consecutively_next_frame) { |
- // TODO(miu): Also account for expected decode time here? |
+ // This assumes that decoding takes as long as playing, which might |
+ // not be true. |
const base::TimeTicks earliest_possible_end_time_of_missing_frame = |
- now + expected_frame_duration_; |
+ now + expected_frame_duration_ * 2; |
if (earliest_possible_end_time_of_missing_frame < playout_time) { |
VLOG(1) << "Wait for next consecutive frame instead of skipping."; |
if (!is_waiting_for_consecutive_frame_) { |
@@ -235,6 +236,8 @@ void FrameReceiver::EmitAvailableEncodedFrames() { |
} |
} |
+ framer_.AckFrame(encoded_frame->frame_id); |
Alpha Left Google
2014/08/25 23:23:44
Please add a comment to explain why frame is ACKed
hubbe
2014/08/27 04:14:03
Done.
|
+ |
// Decrypt the payload data in the frame, if crypto is being used. |
if (decryptor_.is_activated()) { |
std::string decrypted_data; |