mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 21:11:00 +00:00
fallbackswitch: Fix clipping of buffers against the output running time
To handle buffers outside the segment correctly. Also fix debug output to print the correct value.
This commit is contained in:
parent
617a2ef49e
commit
ca7cf7dee7
1 changed files with 8 additions and 3 deletions
|
@ -693,13 +693,18 @@ impl FallbackSwitch {
|
||||||
let discont_pending = state.discont_pending;
|
let discont_pending = state.discont_pending;
|
||||||
|
|
||||||
if is_active {
|
if is_active {
|
||||||
if start_running_time < state.output_running_time {
|
if Option::zip(start_running_time, state.output_running_time).map_or(
|
||||||
|
false,
|
||||||
|
|(start_running_time, output_running_time)| {
|
||||||
|
start_running_time < output_running_time
|
||||||
|
},
|
||||||
|
) {
|
||||||
log!(
|
log!(
|
||||||
CAT,
|
CAT,
|
||||||
obj: pad,
|
obj: pad,
|
||||||
"Dropping trailing buffer {:?} before timeout {}",
|
"Dropping trailing buffer {:?} before output running time {}",
|
||||||
buffer,
|
buffer,
|
||||||
state.timeout_running_time
|
state.output_running_time.display(),
|
||||||
);
|
);
|
||||||
|
|
||||||
return Ok(gst::FlowSuccess::Ok);
|
return Ok(gst::FlowSuccess::Ok);
|
||||||
|
|
Loading…
Reference in a new issue