This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23553 - Segment parser loop appears to discard Media Segment header
Summary: Segment parser loop appears to discard Media Segment header
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: Media Source Extensions (show other bugs)
Version: unspecified
Hardware: PC All
: P2 minor
Target Milestone: LC
Assignee: Aaron Colwell
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-17 19:55 UTC by Mark Watson
Modified: 2013-10-29 22:11 UTC (History)
3 users (show)

See Also:


Attachments

Description Mark Watson 2013-10-17 19:55:53 UTC
Section 3.5.1, step 6, if the input buffer does contain a complete media segment (sub-step 2) but it does not contain a complete coded frame, then the coded frame processing algorithm is not run and at sub-step 4 the media segment bytes (containing the header) are removed.

A possible fix would be to jump after sub-step 3 to the 'Need more data' step if the entire media segment is not in the input buffer. The media segment data is then not discarded (and step 6 is not executed) until the entire segment is received.

This also obviates the need for the NOTE about incremental parsers.
Comment 1 Aaron Colwell 2013-10-18 20:40:03 UTC
I'll figure out a way to reword this. I just want to make it clear that coded frame processing may begin before the end of the segment is actually received. I also think that it is important to make it clear that once a coded frame is processed, the data is not necessarily still available in the input buffer. That is why the current algorithm removes media segment data as it goes.
Comment 2 Aaron Colwell 2013-10-29 22:11:34 UTC
Change committed
https://dvcs.w3.org/hg/html-media/rev/15e7e8f7eecd

I basically went w/ Mark's suggestions, but put the new step after sub-step 4 instead of sub-step 3 so that the SourceBuffer can signal that it can't accept more data.