           client.isWaitingForKeyFrame = false
 
         if client.isPlaying
+          rtpBuffer = Buffer.concat [new Buffer(rtpData), thisNalUnit],
+            rtp.RTP_HEADER_LEN + 2 + thisNalUnitLen
           rtp.replaceSSRCInRTP rtpBuffer, client.videoSSRC
 
           logger.tag 'rtsp:out', "[rtsp:stream:#{stream.id}] send video to #{client.id}: fragment n=#{fragmentNumber} timestamp=#{ts} bytes=#{rtpBuffer.length} marker=false keyframe=#{isKeyFrame}"


      # Append NAL unit
      thisNalUnitLen = thisNalUnit.length
      rtpBuffer = Buffer.concat [new Buffer(rtpData), thisNalUnit],
        rtp.RTP_HEADER_LEN + 2 + thisNalUnitLen

      for clientID, client of stream.rtspClients
        if client.isWaitingForKeyFrame and isKeyFrame


      rtpData = rtpData.concat audioHeader

      for clientID, client of stream.rtspClients
        # Append the access unit (rawDataBlock)
        rtpBuffer = Buffer.concat [new Buffer(rtpData), concatRawDataBlock],
          rtp.RTP_HEADER_LEN + audioHeader.length + accessUnitLength
        if client.isPlaying
          rtp.replaceSSRCInRTP rtpBuffer, client.audioSSRC

