From 2ad85256a3b409591b88e707f2a817d74bb1dc3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Mon, 17 Jan 2022 15:23:42 +0100 Subject: [PATCH] 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 --- media-converter/src/audioconvbin/imp.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/media-converter/src/audioconvbin/imp.rs b/media-converter/src/audioconvbin/imp.rs index f956895b..dc469ed6 100644 --- a/media-converter/src/audioconvbin/imp.rs +++ b/media-converter/src/audioconvbin/imp.rs @@ -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,