diff --git a/docs/plugins/gst_plugins_cache.json b/docs/plugins/gst_plugins_cache.json index f6b39921..89aefba9 100644 --- a/docs/plugins/gst_plugins_cache.json +++ b/docs/plugins/gst_plugins_cache.json @@ -1070,7 +1070,7 @@ "writable": true } }, - "rank": "primary + 1" + "rank": "primary" } }, "filename": "gstdav1d", diff --git a/video/dav1d/src/dav1ddec/mod.rs b/video/dav1d/src/dav1ddec/mod.rs index 8d427128..e73b3cf5 100644 --- a/video/dav1d/src/dav1ddec/mod.rs +++ b/video/dav1d/src/dav1ddec/mod.rs @@ -18,10 +18,13 @@ glib::wrapper! { } pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { - gst::Element::register( - Some(plugin), - "dav1ddec", - gst::Rank::Primary + 1, - Dav1dDec::static_type(), - ) + let rank = if gst::version() >= (1, 21, 2, 1) { + // AOM av1dec rank was demoted in 1.22 dev cycle + // https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3287 + gst::Rank::Primary + } else { + gst::Rank::Primary + 1 + }; + + gst::Element::register(Some(plugin), "dav1ddec", rank, Dav1dDec::static_type()) }