mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-02-18 05:45:14 +00:00
dav1ddec: Write src_query() in match syntax for easier extensibility
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
This commit is contained in:
parent
2c3514a5a1
commit
557917b92a
1 changed files with 51 additions and 50 deletions
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue