Default to now instead of ... epoch? when endtime is null. Fixes video playing when event is incomplete
This commit is contained in:
parent
6609c154f2
commit
8c2dec03b6
|
@ -141,7 +141,7 @@ bool EventStream::loadEventData(uint64_t event_id) {
|
||||||
event_data->storage_id = dbrow[1] ? atoi(dbrow[1]) : 0;
|
event_data->storage_id = dbrow[1] ? atoi(dbrow[1]) : 0;
|
||||||
event_data->frame_count = dbrow[2] == nullptr ? 0 : atoi(dbrow[2]);
|
event_data->frame_count = dbrow[2] == nullptr ? 0 : atoi(dbrow[2]);
|
||||||
event_data->start_time = SystemTimePoint(Seconds(atoi(dbrow[3])));
|
event_data->start_time = SystemTimePoint(Seconds(atoi(dbrow[3])));
|
||||||
event_data->end_time = dbrow[4] ? SystemTimePoint(Seconds(atoi(dbrow[4]))) : SystemTimePoint();
|
event_data->end_time = dbrow[4] ? SystemTimePoint(Seconds(atoi(dbrow[4]))) : std::chrono::system_clock::now();
|
||||||
event_data->duration = std::chrono::duration_cast<Microseconds>(event_data->end_time - event_data->start_time);
|
event_data->duration = std::chrono::duration_cast<Microseconds>(event_data->end_time - event_data->start_time);
|
||||||
event_data->frames_duration =
|
event_data->frames_duration =
|
||||||
std::chrono::duration_cast<Microseconds>(dbrow[5] ? FPSeconds(atof(dbrow[5])) : FPSeconds(0.0));
|
std::chrono::duration_cast<Microseconds>(dbrow[5] ? FPSeconds(atof(dbrow[5])) : FPSeconds(0.0));
|
||||||
|
|
Loading…
Reference in New Issue