From 7c1ca3ef5595d0b40dce55ec697998007d40fff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 8 Feb 2019 15:12:19 +0200 Subject: [PATCH] flvdemux: Use 8kHz sample rate for alaw/mulaw See https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/merge_requests/110 --- gst-plugin-flv/src/flvdemux.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst-plugin-flv/src/flvdemux.rs b/gst-plugin-flv/src/flvdemux.rs index ba047b7f..5724e7d2 100644 --- a/gst-plugin-flv/src/flvdemux.rs +++ b/gst-plugin-flv/src/flvdemux.rs @@ -1236,8 +1236,10 @@ impl AudioFormat { ) -> AudioFormat { let numeric_rate = match (data_header.sound_format, data_header.sound_rate) { (flavors::SoundFormat::NELLYMOSER_16KHZ_MONO, _) => 16_000, - (flavors::SoundFormat::NELLYMOSER_8KHZ_MONO, _) => 8_000, - (flavors::SoundFormat::MP3_8KHZ, _) => 8_000, + (flavors::SoundFormat::NELLYMOSER_8KHZ_MONO, _) + | (flavors::SoundFormat::PCM_ALAW, _) + | (flavors::SoundFormat::PCM_ULAW, _) + | (flavors::SoundFormat::MP3_8KHZ, _) => 8_000, (flavors::SoundFormat::SPEEX, _) => 16_000, (_, flavors::SoundRate::_5_5KHZ) => 5_512, (_, flavors::SoundRate::_11KHZ) => 11_025,