svn commit: r507564 - branches/2019Q3/www/chromium/files
Carlos J. Puga Medina
cpm at FreeBSD.org
Mon Jul 29 09:36:34 UTC 2019
Author: cpm
Date: Mon Jul 29 09:36:33 2019
New Revision: 507564
URL: https://svnweb.freebsd.org/changeset/ports/507564
Log:
MFH: r507520
www/chromium: Fix audio/video synchronization bug after r506266
PR: 238869
Submitted by: tobik
Reported by: jrm
Approved by: ports-secteam (miwi)
Modified:
branches/2019Q3/www/chromium/files/sndio_input.cc
branches/2019Q3/www/chromium/files/sndio_output.cc
Directory Properties:
branches/2019Q3/ (props changed)
Modified: branches/2019Q3/www/chromium/files/sndio_input.cc
==============================================================================
--- branches/2019Q3/www/chromium/files/sndio_input.cc Mon Jul 29 09:02:22 2019 (r507563)
+++ branches/2019Q3/www/chromium/files/sndio_input.cc Mon Jul 29 09:36:33 2019 (r507564)
@@ -188,7 +188,7 @@ void SndioAudioInputStream::ThreadLoop(void) {
// convert frames count to TimeDelta
const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
- params.sample_rate() * 1000);
+ params.sample_rate());
// push into bus
audio_bus->FromInterleaved(buffer, nframes, SampleFormatToBytesPerChannel(kSampleFormat));
Modified: branches/2019Q3/www/chromium/files/sndio_output.cc
==============================================================================
--- branches/2019Q3/www/chromium/files/sndio_output.cc Mon Jul 29 09:02:22 2019 (r507563)
+++ branches/2019Q3/www/chromium/files/sndio_output.cc Mon Jul 29 09:36:33 2019 (r507564)
@@ -140,7 +140,7 @@ void SndioAudioOutputStream::GetVolume(double* v) {
}
void SndioAudioOutputStream::ThreadLoop(void) {
- int avail, count;
+ int avail, count, result;
while (state == kRunning) {
// Update volume if needed
@@ -152,7 +152,8 @@ void SndioAudioOutputStream::ThreadLoop(void) {
pthread_mutex_unlock(&mutex);
// Get data to play
- const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay, params.sample_rate() * 1000);
+ const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
+ params.sample_rate());
count = source->OnMoreData(delay, base::TimeTicks::Now(), 0, audio_bus.get());
audio_bus->ToInterleaved(count, SampleFormatToBytesPerChannel(kSampleFormat), buffer);
if (count == 0) {
@@ -164,8 +165,8 @@ void SndioAudioOutputStream::ThreadLoop(void) {
// Submit data to the device
avail = count * params.GetBytesPerFrame(kSampleFormat);
- count = sio_write(hdl, buffer, avail);
- if (count == 0) {
+ result = sio_write(hdl, buffer, avail);
+ if (result == 0) {
LOG(WARNING) << "Audio device disconnected.";
break;
}
More information about the svn-ports-all
mailing list