Parsed: 112270

  private function EnsureBufferHasEnoughData($min_data=1024) {
    if (($this->current_offset - $this->EBMLbuffer_offset) >= ($this->EBMLbuffer_length - $min_data)) {
      $read_bytes = max($min_data, $this->getid3->fread_buffer_size());

      try {
        $this->fseek($this->current_offset);
        $this->EBMLbuffer_offset = $this->current_offset;
        $this->EBMLbuffer        = $this->fread($read_bytes);
        $this->EBMLbuffer_length = strlen($this->EBMLbuffer);
      } catch (getid3_exception $e) {
        $this->warning('EBML parser: '.$e->getMessage());
        return false;
      }

      if ($this->EBMLbuffer_length == 0 && $this->feof()) {
        return $this->error('EBML parser: ran out of file at offset '.$this->current_offset);
      }
    }
    return true;
  }