Changeset 273513 in webkit
- Timestamp:
- Feb 25, 2021, 2:14:59 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/mac-bigsur/media/media-source/content/test-48kHz-vorbis-manifest.json (added)
-
LayoutTests/platform/mac-bigsur/media/media-source/content/test-48kHz-vorbis.webm (added)
-
LayoutTests/platform/mac-bigsur/media/media-source/media-source-webm-vorbis-partial-expected.txt (added)
-
LayoutTests/platform/mac-bigsur/media/media-source/media-source-webm-vorbis-partial.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp (modified) (2 diffs)
-
Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r273512 r273513 1 2021-02-25 Jer Noble <jer.noble@apple.com> 2 3 [Cocoa] Appending a partial segment of a WebM audio file results in no additional samples 4 https://bugs.webkit.org/show_bug.cgi?id=222407 5 <rdar://74610383> 6 7 Reviewed by Eric Carlson. 8 9 * platform/mac-bigsur/media/media-source/content/test-48kHz-vorbis-manifest.json: Added. 10 * platform/mac-bigsur/media/media-source/content/test-48kHz-vorbis.webm: Added. 11 * platform/mac-bigsur/media/media-source/media-source-webm-vorbis-partial-expected.txt: Added. 12 * platform/mac-bigsur/media/media-source/media-source-webm-vorbis-partial.html: Added. 13 1 14 2021-02-25 Myles C. Maxfield <mmaxfield@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r273512 r273513 1 2021-02-25 Jer Noble <jer.noble@apple.com> 2 3 [Cocoa] Appending a partial segment of a WebM audio file results in no additional samples 4 https://bugs.webkit.org/show_bug.cgi?id=222407 5 <rdar://74610383> 6 7 Reviewed by Eric Carlson. 8 9 Test: media/media-source/media-source-webm-vorbis-partial.html 10 11 When appending a partial WebM segment, it can occur that the parser is mid-way through 12 parsing a Block or SimpleBlock, and is waiting for enough data to be appended to construct a 13 full sample. However, previous appends are not accounted for when calculated the amount of 14 data to be requested from the reader, which both results in too much data read and a 15 miscalculation of the `bytesRemaining` out-param. This causes all subsequent appends to 16 generate no samples, leading to an apparent stall in playback. 17 18 Add a new ivar to track the number of partial bytes read, and use that value to calculate 19 the number of bytes yet to be parsed. 20 21 * platform/graphics/cocoa/SourceBufferParserWebM.cpp: 22 (WebCore::SourceBufferParserWebM::VideoTrackData::createSampleBuffer): 23 * platform/graphics/cocoa/SourceBufferParserWebM.h: 24 1 25 2021-02-25 Myles C. Maxfield <mmaxfield@apple.com> 2 26 -
trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp
r273501 r273513 1227 1227 m_packetData.resize(m_packetBytesRead + metadata.size); 1228 1228 size_t packetDataOffset = m_packetBytesRead; 1229 1230 ASSERT(m_partialBytesRead < metadata.size); 1229 1231 size_t bytesToRead = metadata.size; 1232 if (m_partialBytesRead && m_partialBytesRead < bytesToRead) 1233 bytesToRead -= m_partialBytesRead; 1230 1234 while (bytesToRead) { 1231 1235 uint64_t bytesRead; … … 1236 1240 1237 1241 // FIXME: We can't yet handle parsing a Frame that doesn't have all its memory available. 1238 if (status.code == webm::Status::kOkPartial || status.code == webm::Status::kWouldBlock) 1242 if (status.code == webm::Status::kOkPartial || status.code == webm::Status::kWouldBlock) { 1243 m_partialBytesRead += bytesRead; 1239 1244 return status; 1245 } 1246 1247 m_partialBytesRead = 0; 1240 1248 } 1241 1249 -
trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.h
r273089 r273513 216 216 size_t m_packetBytesRead { 0 }; 217 217 size_t m_byteOffset { 0 }; 218 size_t m_partialBytesRead { 0 }; 218 219 Vector<AudioStreamPacketDescription> m_packetDescriptions; 219 220
Note:
See TracChangeset
for help on using the changeset viewer.