From 2c511fca50b0d77bba0505e0b4ad4bf894a68dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 2 Feb 2022 17:10:30 +0200 Subject: [PATCH] dav1ddec: Require correct alignment and stream format when running with GStreamer 1.20 --- video/dav1d/src/dav1ddec/imp.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/video/dav1d/src/dav1ddec/imp.rs b/video/dav1d/src/dav1ddec/imp.rs index 741ab69a..6167840e 100644 --- a/video/dav1d/src/dav1ddec/imp.rs +++ b/video/dav1d/src/dav1ddec/imp.rs @@ -461,7 +461,14 @@ impl ElementImpl for Dav1dDec { fn pad_templates() -> &'static [gst::PadTemplate] { static PAD_TEMPLATES: Lazy> = Lazy::new(|| { - let sink_caps = gst::Caps::builder("video/x-av1").build(); + let sink_caps = if gst::version() >= (1, 19, 0, 0) { + gst::Caps::builder("video/x-av1") + .field("stream-format", "obu-stream") + .field("alignment", gst::List::new(["frame", "tu"])) + .build() + } else { + gst::Caps::builder("video/x-av1").build() + }; let sink_pad_template = gst::PadTemplate::new( "sink", gst::PadDirection::Sink,