flvdemux: Use 8kHz sample rate for alaw/mulaw

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/merge_requests/110
This commit is contained in:
Sebastian Dröge 2019-02-08 15:12:19 +02:00
parent c4885c6aab
commit 7c1ca3ef55

View file

@ -1236,8 +1236,10 @@ impl AudioFormat {
) -> AudioFormat { ) -> AudioFormat {
let numeric_rate = match (data_header.sound_format, data_header.sound_rate) { let numeric_rate = match (data_header.sound_format, data_header.sound_rate) {
(flavors::SoundFormat::NELLYMOSER_16KHZ_MONO, _) => 16_000, (flavors::SoundFormat::NELLYMOSER_16KHZ_MONO, _) => 16_000,
(flavors::SoundFormat::NELLYMOSER_8KHZ_MONO, _) => 8_000, (flavors::SoundFormat::NELLYMOSER_8KHZ_MONO, _)
(flavors::SoundFormat::MP3_8KHZ, _) => 8_000, | (flavors::SoundFormat::PCM_ALAW, _)
| (flavors::SoundFormat::PCM_ULAW, _)
| (flavors::SoundFormat::MP3_8KHZ, _) => 8_000,
(flavors::SoundFormat::SPEEX, _) => 16_000, (flavors::SoundFormat::SPEEX, _) => 16_000,
(_, flavors::SoundRate::_5_5KHZ) => 5_512, (_, flavors::SoundRate::_5_5KHZ) => 5_512,
(_, flavors::SoundRate::_11KHZ) => 11_025, (_, flavors::SoundRate::_11KHZ) => 11_025,