       streamName = publishingName
 
     @emit 'stream_reset'
+    @isFirstVideoReceived = false
+    @isFirstAudioReceived = false
 
     publishStart = createAMF0CommandMessage
       chunkStreamID: 4

            when 8  # Audio Message (incoming)
              audioData = parseAudioMessage rtmpMessage.body
              if audioData.adtsFrame?
                pts = dts = flv.convertMsToPTS rtmpMessage.timestamp
                @emit 'audio_data', pts, dts, audioData.adtsFrame
              seq.done()
            when 9  # Video Message (incoming)
              videoData = parseVideoMessage rtmpMessage.body
              if videoData.nalUnitGlob?
                dts = rtmpMessage.timestamp
                pts = dts + videoData.info.videoDataTag.compositionTime
                pts = flv.convertMsToPTS pts

  receiveSetDataFrame: (requestData) ->
    if requestData.objects[1].value is 'onMetaData'
      console.log "[rtmp:receive] @setDataFrame onMetaData"
    else
      throw new Error "Unknown @setDataFrame: #{requestData.objects[1].value}"

