       totalTime = 0
     for entry in @entries
       sampleIndexInChunk = Math.floor(remainingTime / entry.sampleDelta)
+      if sampleIndexInChunk < 0
+        sampleIndexInChunk = 0
       if sampleIndexInChunk < entry.sampleCount
         totalTime += sampleIndexInChunk * entry.sampleDelta
         return {

          @currentPlayTime = minTime
      else
        # No audio sample left
        audioSampleNumber = @numAudioSamples + 1
        @isAudioEOF = true
    else

        videoSampleNumber = videoSample.sampleNumber
      else
        # No video sample left
        logger.debug "video sample >= #{seekSeconds} does not exist"
        @isVideoEOF = true
        @currentPlayTime = @getDurationSeconds()
        videoSampleNumber = @numVideoSamples + 1
