 					trace("Grabbing AVC PPS length=" + length);
 					setAVCPPS(bytes, cursor, length);
 					appendAVCNALU(bytes, cursor + 3, length - 3);
-					_keyFrame = true;
-					break;
-								
+					break;
+				
 				case 0x09: // "access unit delimiter"
 					switch((bytes[cursor + 4] >> 5) & 0x07) // access unit type
 					{

							_keyFrame = false;
							break;
					}
				default:
					// Infer keyframe state.
					if(naluType == 5)

				}
			}
			
			if(_avcPacket.length == 0)
				return;

			var codec:uint;
			if(_keyFrame)
				codec = FLVTags.VIDEO_CODEC_AVC_KEYFRAME;
			else
				codec = FLVTags.VIDEO_CODEC_AVC_PREDICTIVEFRAME;
			
			flvGenerationBuffer.length = 3 + length;
			flvGenerationBuffer[0] = (tsu >> 16) & 0xff;
			flvGenerationBuffer[1] = (tsu >>  8) & 0xff;
			flvGenerationBuffer[2] = (tsu      ) & 0xff;
			flvGenerationBuffer.position = 3;
			flvGenerationBuffer.writeBytes(_avcPacket);
			_avcPacket.length = 0;
			
			sendFLVTag(flvts, FLVTags.TYPE_VIDEO, codec, FLVTags.AVC_MODE_PICTURE, flvGenerationBuffer, 0, flvGenerationBuffer.length);
		}
		
		private function setAVCSPS(bytes:ByteArray, cursor:uint, length:uint):void
