media-converter: Add format=S16LE to audioconv caps.

As opusdec will only output that format, and we want to be able to
filter the elements from their capabilities early.

CW-Bug-Id: #19854
This commit is contained in:
Rémi Bernon 2022-01-17 15:23:42 +01:00 committed by Arkadiusz Hiler
parent f0a10371c9
commit 2ad85256a3

View File

@ -155,7 +155,9 @@ impl ElementImpl for AudioConvBin {
gst::PadPresence::Always,
&caps).unwrap();
let caps = gst::Caps::builder("audio/x-raw").build();
let caps = gst::Caps::builder("audio/x-raw")
.field("format", "S16LE") /* opusdec always output S16LE */
.build();
let src_pad_template = gst::PadTemplate::new(
"src",
gst::PadDirection::Src,