Bug 226069

Summary: [Cocoa] Last few seconds of 'audio/webm; codecs=vorbis' appended to a SampleBuffer are not played
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, commit-queue, eric.carlson, ews-watchlist, glenn, jean-yves.avenard, peng.liu6, philipj, sergio, tsavell, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 226211, 227499    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch for landing
none
Patch for landing
ews-feeder: commit-queue-
Patch for landing
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description Jer Noble 2021-05-20 23:31:08 PDT
[Cocoa] Last few seconds of 'audio/webm; codecs=vorbis' appended to a SampleBuffer are not played
Comment 1 Jer Noble 2021-05-20 23:31:34 PDT
<rdar://78004793>
Comment 2 Jer Noble 2021-05-20 23:37:19 PDT
Created attachment 429267 [details]
Patch
Comment 3 Jer Noble 2021-05-21 08:14:59 PDT
mac-AS-debug-wk2 bot is failing because it's not been updated to macOS 11.3, which has support for Vorbis.
Comment 4 EWS 2021-05-21 10:07:55 PDT
Committed r277867 (238007@main): <https://commits.webkit.org/238007@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 429267 [details].
Comment 5 Truitt Savell 2021-05-24 14:18:00 PDT
the new test platform/mac-bigsur/media/media-source/media-vorbis-partial.html

is failing constantly sense introduction

History:
https://results.webkit.org/?suite=layout-tests&test=platform%2Fmac-bigsur%2Fmedia%2Fmedia-source%2Fmedia-vorbis-partial.html

Diff:
--- /Volumes/Data/worker/bigsur-release-tests-wk2/build/layout-test-results/platform/mac-bigsur/media/media-source/media-vorbis-partial-expected.txt
+++ /Volumes/Data/worker/bigsur-release-tests-wk2/build/layout-test-results/platform/mac-bigsur/media/media-source/media-vorbis-partial-actual.txt
@@ -3,10 +3,9 @@
 EVENT(sourceopen)
 RUN(source.duration = loader.duration())
 RUN(sourceBuffer = source.addSourceBuffer(loader.type()))
+NotSupportedError: The operation is not supported.
 RUN(sourceBuffer.appendBuffer(loader.initSegment()))
-EVENT(update)
-Append a media segment.
-RUN(sourceBuffer.appendBuffer(loader.mediaSegment(0)))
-EVENT(update)
-EXPECTED (sourceBuffer.buffered.end(0) == source.duration == 'true') OK
+TypeError: undefined is not an object (evaluating 'sourceBuffer.appendBuffer')
+Caught exception: "TypeError: undefined is not an object (evaluating 'element.addEventListener')" FAIL
 END OF TEST
+
Comment 6 WebKit Commit Bot 2021-05-24 21:11:23 PDT
Re-opened since this is blocked by bug 226211
Comment 7 Jer Noble 2021-06-23 23:46:53 PDT
<rdar://78795924>
Comment 8 Jer Noble 2021-06-23 23:47:14 PDT
Created attachment 432134 [details]
Patch for landing
Comment 9 Jer Noble 2021-06-23 23:47:56 PDT
Created attachment 432135 [details]
Patch for landing
Comment 10 Jer Noble 2021-06-24 09:33:45 PDT
Created attachment 432175 [details]
Patch for landing
Comment 11 Jer Noble 2021-06-24 13:31:34 PDT
Created attachment 432206 [details]
Patch for landing
Comment 12 EWS 2021-06-24 16:08:03 PDT
Committed r279250 (239134@main): <https://commits.webkit.org/239134@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 432206 [details].
Comment 13 WebKit Commit Bot 2021-06-29 13:18:28 PDT
Re-opened since this is blocked by bug 227499
Comment 14 Jean-Yves Avenard [:jya] 2021-06-30 04:08:13 PDT
*** Bug 227382 has been marked as a duplicate of this bug. ***
Comment 15 Jean-Yves Avenard [:jya] 2021-06-30 09:50:08 PDT
Created attachment 432607 [details]
Patch
Comment 16 Eric Carlson 2021-06-30 10:14:56 PDT
Comment on attachment 432607 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=432607&action=review

> Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp:304
> +            if (numActuallyRead)

We return early above if `numActuallyRead` is null
Comment 17 Jean-Yves Avenard [:jya] 2021-06-30 16:22:05 PDT
Created attachment 432641 [details]
Patch

skip opus test on non Montarey OS as the codec isn't supported
Comment 18 Jean-Yves Avenard [:jya] 2021-06-30 19:22:04 PDT
Created attachment 432651 [details]
Patch

apply comment
Comment 19 Jean-Yves Avenard [:jya] 2021-07-01 00:58:35 PDT
Created attachment 432665 [details]
Patch

Move tests to media/media-source rather than platform
Comment 20 Jean-Yves Avenard [:jya] 2021-07-01 01:10:27 PDT
Created attachment 432666 [details]
Patch

TestExpectations file wasn't committed
Comment 21 Eric Carlson 2021-07-01 10:27:33 PDT
Comment on attachment 432666 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=432666&action=review

> Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp:304
> +                *numActuallyRead += lastRead;

Nit: indentation is wrong
Comment 22 Jean-Yves Avenard [:jya] 2021-07-01 15:41:37 PDT
Created attachment 432736 [details]
Patch

apply comment
Comment 23 EWS 2021-07-01 18:08:52 PDT
Committed r279492 (239344@main): <https://commits.webkit.org/239344@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 432736 [details].
Comment 24 Jean-Yves Avenard [:jya] 2021-07-01 20:14:02 PDT
iOS-wk2 isn't related to this patch, it doesn't use MSE nor a webm container.