id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	thread
1551	HLS: FP 11 hanging, due to bufferlength check issues	jeroen	jeroen	"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++;
        }

}}}"	bug	closed	Normal	Plugins	embedding	fixed			
