[webkit-reviews] review granted: [Bug 228140] [WebAudio] webm; properly trim frames according to the codec delay information : [Attachment 434733] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 2 09:13:34 PDT 2021
Eric Carlson <eric.carlson at apple.com> has granted Jean-Yves Avenard [:jya]
<jean-yves.avenard at apple.com>'s request for review:
Bug 228140: [WebAudio] webm; properly trim frames according to the codec delay
information
https://bugs.webkit.org/show_bug.cgi?id=228140
Attachment 434733: Patch
https://bugs.webkit.org/attachment.cgi?id=434733&action=review
--- Comment #6 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 434733
--> https://bugs.webkit.org/attachment.cgi?id=434733
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=434733&action=review
> Source/WebCore/ChangeLog:11
> + vorbis decoding return the right number of frames.
s/return/returns/
> Source/WebCore/platform/audio/cocoa/AudioFileReaderCocoa.cpp:266
> + if (static_cast<char*>(data->mBuffers[0].mData) +
data->mBuffers[0].mDataByteSize > userData->m_data + userData->m_dataSize)
> + return kAudioConverterErr_UnspecifiedError;
This is serious enough that it might be worth logging an error.
> Source/WebCore/platform/audio/cocoa/AudioFileReaderCocoa.cpp:322
> + PAL::AudioConverterSetProperty(converter, kAudioConverterPrimeInfo,
sizeof(AudioConverterPrimeInfo), &primeInfo);
Nit: sizeof(primeInfo)
> Source/WebCore/platform/audio/cocoa/AudioFileReaderCocoa.cpp:377
> + } while (status != kNoMoreDataErr && status != noErr);
It seems a little weird to use "noErr" to signal eos, why not define a specific
error like we did for kNoMoreDataErr?
> Source/WebCore/platform/graphics/cocoa/AudioTrackPrivateWebM.cpp:93
> + return MediaTime(m_track.codec_delay.value(), 1000000000);
It would be helpful to people that don't know about WebM who read this to use a
named constant for 1000000000.
> Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp:1036
> + m_callOnClientThreadCallback([this, protectedThis =
makeRef(*this), trackID = trackData->track().track_uid.value(), padding =
MediaTime(blockGroup.discard_padding.value(), 1000000000)]() {
Ditto.
More information about the webkit-reviews
mailing list