getid3_matroska::EnsureBufferHasEnoughData()
{} It's a method of the class: getid3_matroska{}
No Hooks.
Return
true|false
.
Usage
// private - for code of main (parent) class only $result = $this->EnsureBufferHasEnoughData( $min_data );
- $min_data(int)
- -
Default: 1024
Code of getid3_matroska::EnsureBufferHasEnoughData() getid3 matroska::EnsureBufferHasEnoughData WP 6.0
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; }