onvifmetadataparse: Handle negative running times in debug output

This commit is contained in:
Sebastian Dröge 2022-09-27 14:33:26 +03:00 committed by Sebastian Dröge
parent 7479888200
commit f0b2df49dc

View file

@ -561,11 +561,7 @@ impl OnvifMetadataParse {
obj: element, obj: element,
"Scheduling timer for {} / running time {}, now {}", "Scheduling timer for {} / running time {}, now {}",
earliest_clock_time, earliest_clock_time,
earliest_running_time earliest_running_time.unwrap().display(),
.unwrap()
.positive()
.unwrap_or(gst::ClockTime::ZERO)
.display(),
clock.time().display(), clock.time().display(),
); );
state.clock_wait = Some(clock.new_single_shot_id(earliest_clock_time)); state.clock_wait = Some(clock.new_single_shot_id(earliest_clock_time));
@ -965,7 +961,7 @@ impl OnvifMetadataParse {
obj: element, obj: element,
"Queueing event with UTC time {} / running time {}", "Queueing event with UTC time {} / running time {}",
current_utc_time, current_utc_time,
current_running_time.positive().display(), current_running_time.display(),
); );
let frame = queued_frames let frame = queued_frames
@ -997,7 +993,7 @@ impl OnvifMetadataParse {
CAT, CAT,
obj: element, obj: element,
"Pre-queueing event with running time {}", "Pre-queueing event with running time {}",
current_running_time.positive().display() current_running_time.display()
); );
pre_queued_buffers.push(TimedBufferOrEvent::Event(current_running_time, event)); pre_queued_buffers.push(TimedBufferOrEvent::Event(current_running_time, event));