Add reset_update_state method

This commit is contained in:
Daniil Gentili 2018-12-27 11:27:05 +00:00
parent 0b7c8678b4
commit 5b83cd9322

View File

@ -242,7 +242,16 @@ trait UpdateHandler
$this->load_update_state()['date'] = $data['date'];
}
}
public function reset_update_state()
{
$this->load_update_state()['pts'] = 0;
$this->load_update_state()['qts'] = 0;
$this->load_update_state()['seq'] = 0;
$this->load_update_state()['date'] = 0;
foreach ($this->channels_state as &$state) {
$state['pts'] = 0;
}
}
public function &load_update_state()
{
if (!isset($this->updates_state['qts'])) {