Title: [216645] trunk/Source/WebCore
- Revision
- 216645
- Author
- [email protected]
- Date
- 2017-05-10 18:51:36 -0700 (Wed, 10 May 2017)
Log Message
RELEASE_ASSERT at WebAudioSourceProviderAVFObjC::provideInput()
https://bugs.webkit.org/show_bug.cgi?id=171711
Reviewed by Youenn Fablet.
Before iterating over the channels in either the WebAudioBufferList or the AudioBus, ensure
we don't walk over the end of either by only iterating over the minimum length of either.
Also, when the internal format of WebAudioSourceProviderAVFObjC changes, notify the
MediaStreamAudioSourceNode that the number of channels and sample rate have changed.
* platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
(WebCore::WebAudioSourceProviderAVFObjC::provideInput):
(WebCore::WebAudioSourceProviderAVFObjC::prepare):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (216644 => 216645)
--- trunk/Source/WebCore/ChangeLog 2017-05-11 00:56:00 UTC (rev 216644)
+++ trunk/Source/WebCore/ChangeLog 2017-05-11 01:51:36 UTC (rev 216645)
@@ -1,3 +1,19 @@
+2017-05-10 Jer Noble <[email protected]>
+
+ RELEASE_ASSERT at WebAudioSourceProviderAVFObjC::provideInput()
+ https://bugs.webkit.org/show_bug.cgi?id=171711
+
+ Reviewed by Youenn Fablet.
+
+ Before iterating over the channels in either the WebAudioBufferList or the AudioBus, ensure
+ we don't walk over the end of either by only iterating over the minimum length of either.
+ Also, when the internal format of WebAudioSourceProviderAVFObjC changes, notify the
+ MediaStreamAudioSourceNode that the number of channels and sample rate have changed.
+
+ * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
+ (WebCore::WebAudioSourceProviderAVFObjC::provideInput):
+ (WebCore::WebAudioSourceProviderAVFObjC::prepare):
+
2017-05-10 Andy Estes <[email protected]>
REGRESSION (r167845): ASSERT(!m_renderView.needsLayout()) in svg/custom/bug79798.html
Modified: trunk/Source/WebCore/platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm (216644 => 216645)
--- trunk/Source/WebCore/platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm 2017-05-11 00:56:00 UTC (rev 216644)
+++ trunk/Source/WebCore/platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm 2017-05-11 01:51:36 UTC (rev 216645)
@@ -80,8 +80,12 @@
}
WebAudioBufferList list { *m_outputDescription };
- for (unsigned i = 0; i < list.bufferCount(); ++i) {
+ for (unsigned i = 0; i < bus->numberOfChannels(); ++i) {
AudioChannel& channel = *bus->channel(i);
+ if (i >= list.bufferCount()) {
+ channel.zero();
+ continue;
+ }
auto* buffer = list.buffer(i);
buffer->mNumberChannels = 1;
buffer->mData = channel.mutableData();
@@ -137,8 +141,7 @@
m_dataSource->setInputFormat(*m_inputDescription);
m_dataSource->setOutputFormat(*m_outputDescription);
- RefPtr<WebAudioSourceProviderAVFObjC> protectedThis = this;
- callOnMainThread([protectedThis = WTFMove(protectedThis), numberOfChannels, sampleRate] {
+ callOnMainThread([protectedThis = makeRef(*this), numberOfChannels, sampleRate] {
if (protectedThis->m_client)
protectedThis->m_client->setFormat(numberOfChannels, sampleRate);
});
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes