dav1ddec: Require correct alignment and stream format when running with GStreamer 1.20

This commit is contained in:
Sebastian Dröge 2022-02-02 17:10:30 +02:00
parent e024eb331d
commit c194fb05f4

View file

@ -396,7 +396,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,