diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2022-02-02 18:10:30 +0300 |
---|---|---|
committer | Sebastian Dröge <slomo@coaxion.net> | 2022-02-03 14:04:57 +0300 |
commit | 2c511fca50b0d77bba0505e0b4ad4bf894a68dc2 (patch) | |
tree | 30a3ca839c244257dbf02378030a097773943677 /video/dav1d | |
parent | 772fbaa0736849b544b23f6c61b433a17a6e8ae6 (diff) |
dav1ddec: Require correct alignment and stream format when running with GStreamer 1.20
Diffstat (limited to 'video/dav1d')
-rw-r--r-- | video/dav1d/src/dav1ddec/imp.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/video/dav1d/src/dav1ddec/imp.rs b/video/dav1d/src/dav1ddec/imp.rs index 741ab69aa..6167840ee 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<Vec<gst::PadTemplate>> = 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, |