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
let pts = buffer.pts().unwrap();
let mut builder = gst::event::Gap::builder(pts)
.duration(buffer.duration())
.seqnum(in_gap_event.seqnum());
#[cfg(feature = "v1_20")]
{
builder = builder.gap_flags(in_gap_event.gap_flags());
}
let out_gap_event = builder.build();
let out_gap_event = {
#[cfg(feature = "v1_20")]
{
gst::event::Gap::builder(pts)
.duration(buffer.duration())
.seqnum(in_gap_event.seqnum())
.gap_flags(in_gap_event.gap_flags())
.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.src_pad.push_event(out_gap_event);