 
   startStream: (timeForVideoRTPZero) ->
     console.log "RTMP server startStream"
-    codecConfigPackets = []
+    spsPacket = null
+    ppsPacket = null
 
   handleRTMPTRequest: (req, callback) ->
     # /fcs/ident2 will be handled in another place


# The latest timestamp of video or audio data
lastTimestamp = null

# Buffer for retaining codec config NAL units
codecConfigPackets = []

# NAL unit type 7: Sequence parameter set
spsPacket = null

  return clientID

retainCodecConfigPacket = (buf) ->
  nalUnitType = buf[0] & 0x1f
  if nalUnitType is 7
    spsPacket = buf
  else if nalUnitType is 8
