diff --git a/CHANGELOG.md b/CHANGELOG.md index 3adc2ce..7538791 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## unreleased + +* [#22](https://github.com/scottlamb/retina/issues/22): fix handling of + 44.1 kHz AAC audio. + ## `v0.2.0` (2021-08-20) * BREAKING CHANGE: `retina::client::Session::describe` now takes a new diff --git a/src/codec/aac.rs b/src/codec/aac.rs index 9f1da31..14d8280 100644 --- a/src/codec/aac.rs +++ b/src/codec/aac.rs @@ -81,7 +81,7 @@ impl AudioSpecificConfig { o => o, }; - // ISO/IEC 14496-3 section 1.6.3.4. + // ISO/IEC 14496-3 section 1.6.3.3. let sampling_frequency = match r .read_u8(4) .map_err(|e| format!("unable to read sampling_frequency: {}", e))? @@ -90,6 +90,7 @@ impl AudioSpecificConfig { 0x1 => 88_200, 0x2 => 64_000, 0x3 => 48_000, + 0x4 => 44_100, 0x5 => 32_000, 0x6 => 24_000, 0x7 => 22_050, @@ -104,7 +105,7 @@ impl AudioSpecificConfig { 0xf => r .read_u32(24) .map_err(|e| format!("unable to read sampling_frequency ext: {}", e))?, - _ => unreachable!(), + 0x10..=0xff => unreachable!(), }; let channels = { let c = r