dav1ddec: Write src_query() in match syntax for easier extensibility
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
@@ -615,7 +615,8 @@ impl ElementImpl for Dav1dDec {
impl VideoDecoderImpl for Dav1dDec {
fn src_query(&self, element: &Self::Type, query: &mut gst::QueryRef) -> bool {
- if let gst::QueryViewMut::Latency(q) = query.view_mut() {
+ match query.view_mut() {
+ gst::QueryViewMut::Latency(q) => {
let state_guard = self.state.lock().unwrap();
let max_frame_delay = {
let settings = self.settings.lock().unwrap();
@@ -669,8 +670,8 @@ impl VideoDecoderImpl for Dav1dDec {
// no state yet
None => false,
}
- } else {
- VideoDecoderImplExt::parent_src_query(self, element, query)
+ }
+ _ => VideoDecoderImplExt::parent_src_query(self, element, query),
}
}
