[Webkit-unassigned] [Bug 177951] New: [MSE] Dead code in SourceBuffer::appendBufferTimerFired()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Oct 5 10:51:05 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=177951
Bug ID: 177951
Summary: [MSE] Dead code in
SourceBuffer::appendBufferTimerFired()
Product: WebKit
Version: WebKit Local Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Media Elements
Assignee: webkit-unassigned at lists.webkit.org
Reporter: eocanha at igalia.com
The second block of code here[1] is never going to be run because the first block makes the vector to be non-empty:
size_t appendSize = m_pendingAppendData.size();
if (!appendSize) {
// Resize buffer for 0 byte appends so we always have a valid pointer.
// We need to convey all appends, even 0 byte ones to |m_private| so
// that it can clear its end of stream state if necessary.
m_pendingAppendData.resize(1);
}
// Section 3.5.1 Segment Parser Loop
// https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#sourcebuffer-segment-parser-loop
// When the segment parser loop algorithm is invoked, run the following steps:
// 1. Loop Top: If the input buffer is empty, then jump to the need more data step below.
if (!m_pendingAppendData.size()) {
sourceBufferPrivateAppendComplete(AppendSucceeded);
return;
}
Probably the whole platform layer append operation could be avoided by removing the first block and just completing the append in the second code block.
Am I missing something?
[1] https://github.com/WebKit/webkit/blob/624c264648af81a0cf6a3818db9d776d4d6ee15c/Source/WebCore/Modules/mediasource/SourceBuffer.cpp#L549
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171005/98b764a9/attachment.html>
More information about the webkit-unassigned
mailing list