Skip to content
Permalink
Browse files
Fix buggy assert in CoreAudioSharedUnit::configureSpeakerProc
https://bugs.webkit.org/show_bug.cgi?id=240001

Reviewed by Eric Carlson.

Manually tested.

* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
Initialize the sampleRate field before using it.

Canonical link: https://commits.webkit.org/250216@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
youennf committed May 3, 2022
1 parent 1e58bd8 commit c62798d34562dcd0b8fdc676808ef73b74b5e262
Showing 2 changed files with 13 additions and 1 deletion.
@@ -1,3 +1,15 @@
2022-05-03 Youenn Fablet <youenn@apple.com>

Fix buggy assert in CoreAudioSharedUnit::configureSpeakerProc
https://bugs.webkit.org/show_bug.cgi?id=240001

Reviewed by Eric Carlson.

Manually tested.

* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
Initialize the sampleRate field before using it.

2022-05-03 Youenn Fablet <youenn@apple.com>

AudioMediaStreamTrackRendererUnit::updateRenderSourcesIfNecessary can free memory
@@ -346,8 +346,8 @@ OSStatus CoreAudioSharedUnit::configureSpeakerProc(int sampleRate)
{
Locker locker { m_speakerSamplesProducerLock };
if (m_speakerSamplesProducer) {
ASSERT(speakerProcFormat.mSampleRate == sampleRate);
speakerProcFormat = m_speakerSamplesProducer->format().streamDescription();
ASSERT(speakerProcFormat.mSampleRate == sampleRate);
} else {
err = PAL::AudioUnitGetProperty(m_ioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, outputBus, &speakerProcFormat, &size);
if (err) {

0 comments on commit c62798d

Please sign in to comment.