Index: content/renderer/media/webrtc_audio_renderer.cc |
diff --git a/content/renderer/media/webrtc_audio_renderer.cc b/content/renderer/media/webrtc_audio_renderer.cc |
index 9714b237abb44442f927dc712cb4b43f9362bf0b..b47b4f90106432cc654c8bd5cc7f2b1c93d756e4 100644 |
--- a/content/renderer/media/webrtc_audio_renderer.cc |
+++ b/content/renderer/media/webrtc_audio_renderer.cc |
@@ -185,6 +185,7 @@ WebRtcAudioRenderer::WebRtcAudioRenderer( |
start_ref_count_(0), |
audio_delay_milliseconds_(0), |
fifo_delay_milliseconds_(0), |
+ skipped_frames_(0), |
sink_params_(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, |
media::CHANNEL_LAYOUT_STEREO, |
0, |
@@ -430,6 +431,7 @@ int WebRtcAudioRenderer::Render(media::AudioBus* audio_bus, |
DCHECK_LE(audio_delay_milliseconds, static_cast<uint32_t>(INT_MAX)); |
audio_delay_milliseconds_ = static_cast<int>(audio_delay_milliseconds); |
+ skipped_frames_ += frames_skipped; |
if (audio_fifo_) |
audio_fifo_->Consume(audio_bus, audio_bus->frames()); |
@@ -461,7 +463,9 @@ void WebRtcAudioRenderer::SourceCallback( |
// otherwise the data will be buffered up inside |source_|. |
source_->RenderData(audio_bus, sink_params_.sample_rate(), |
output_delay_milliseconds, |
+ skipped_frames_, |
¤t_time_); |
+ skipped_frames_ = 0; |
// Avoid filling up the audio bus if we are not playing; instead |
// return here and ensure that the returned value in Render() is 0. |