Fix a couple of compiler/clippy warnings with --no-default-features

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1457>
This commit is contained in:
Sebastian Dröge 2024-02-08 13:02:37 +02:00
parent ed3b5934d8
commit d0b944b2a7

View file

@ -984,16 +984,23 @@ impl FallbackSwitch {
// be NONE by now // be NONE by now
let pts = buffer.pts().unwrap(); let pts = buffer.pts().unwrap();
let mut builder = gst::event::Gap::builder(pts) let out_gap_event = {
.duration(buffer.duration()) #[cfg(feature = "v1_20")]
.seqnum(in_gap_event.seqnum()); {
gst::event::Gap::builder(pts)
#[cfg(feature = "v1_20")] .duration(buffer.duration())
{ .seqnum(in_gap_event.seqnum())
builder = builder.gap_flags(in_gap_event.gap_flags()); .gap_flags(in_gap_event.gap_flags())
} .build()
}
let out_gap_event = builder.build(); #[cfg(not(feature = "v1_20"))]
{
gst::event::Gap::builder(pts)
.duration(buffer.duration())
.seqnum(in_gap_event.seqnum())
.build()
}
};
self.with_src_busy(|| { self.with_src_busy(|| {
self.src_pad.push_event(out_gap_event); self.src_pad.push_event(out_gap_event);