From 7a6a2ca2e7587380dce0d20c104a15f1e0886164 Mon Sep 17 00:00:00 2001 From: QuantumEntangledAndy Date: Mon, 16 Nov 2020 09:37:49 +0700 Subject: [PATCH] Always decode and reencode aac audio This is so that we can accept mpeg1 and mpeg2 audio in addition to mpeg4 --- src/gst.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gst.rs b/src/gst.rs index d826c8c..bc63e6e 100644 --- a/src/gst.rs +++ b/src/gst.rs @@ -86,7 +86,7 @@ impl GstOutputs { let launch_aud = match self.audio_format { Some(StreamFormat::ADPCM) => "! queue silent=true max-size-bytes=10485760 min-threshold-bytes=1024 ! rawaudioparse format=pcm pcm-format=s16le sample-rate=8000 num-channels=1 interleaved=true ! audioconvert ! rtpL16pay name=pay1", // DVI4 is converted to pcm in the appsrc - Some(StreamFormat::AAC) => "! queue silent=true max-size-bytes=10485760 min-threshold-bytes=1024 ! aacparse ! rtpmp4apay name=pay1", + Some(StreamFormat::AAC) => "! queue silent=true max-size-bytes=10485760 min-threshold-bytes=1024 ! aacparse ! decodebin ! audioconvert ! rtpmp4apay name=pay1", _ => "! fakesink", };