Ticket #1551 (closed bug: fixed)
HLS: FP 11 hanging, due to bufferlength check issues
| Reported by: | jeroen | Owned by: | jeroen |
|---|---|---|---|
| Priority: | Normal | Milestone: | Plugins |
| Component: | embedding | Keywords: | |
| Cc: | Forum thread: |
Description
I've run into a problem with Flash Player 11.1's NetStream and I just can't figure it out. With only some videos, on only some computers, the player is unable to play the first segment. This is only in FP 11.1. I'm using the debug version on a macbook pro with snow leopard. Adobe has changed NetStream to add hardware support. They've added a 'useHardwareDecoder' property, but setting that to false doesn't fix the issue.
This should fix the issue:
// **************************************************************************************
// Fix for Flash Player 11.1 in which NetStream.bufferLength was getting jammed when at
// start of video. Basically, don't allow too much time to pass before we allow bytes to
// be written, since adding bytes seems to unjam the stream.
var kickstart:Boolean = (getTimer() - _lastAppendBytesTime > 1000 && _buffer.length > 0);
// **************************************************************************************
if (_stream.bufferLength < Buffer.LENGTH / 4 || kickstart) {
var time:int = getTimer();
while(_tag < _buffer.length && (_stream.bufferLength < Buffer.LENGTH / 2 || kickstart)) {
_checkFragmentLevel(_tag);
try {
_stream.appendBytes(_encodeTag(_buffer[_tag]));
bytesAdded = true;
_lastAppendBytesTime = time;
} catch (error:Error) {
_errorHandler(error);
}
// Last tag done? Then append sequence end.
if(_next == length && _tag == _buffer.length - 1) {
//trace("[" + new Date().getTime() + "] " + "appendBytesAction END_SEQUENCE");
_stream.appendBytesAction(NetStreamAppendBytesAction.END_SEQUENCE);
}
_tag++;
}
Change History
Note: See
TracTickets for help on using
tickets.

Fixed this in a slightly different way, by changing the relative LENGTH values such that upon start the buffer is filled.