зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1376000: Drop any unknown flags in SinkInfo.flags. r=padenot
Rust expect() is bad in C callbacks. Replace TryFrom() with from_bits_truncate() to drop any unknown PulseAudio flags. MozReview-Commit-ID: 4RWFB5iGW6Z --HG-- extra : rebase_source : 3b05d52ae1295825b4857c41135ff08029ad280c
This commit is contained in:
Родитель
7003e438d1
Коммит
8f2155024b
|
@ -120,7 +120,7 @@ impl Context {
|
|||
let mut ctx = unsafe { &mut *(u as *mut Context) };
|
||||
if eol == 0 {
|
||||
let info = unsafe { &*i };
|
||||
let flags = pulse::SinkFlags::try_from(info.flags).expect("SinkInfo contains invalid flags");
|
||||
let flags = pulse::SinkFlags::from_bits_truncate(info.flags);
|
||||
ctx.default_sink_info = Some(DefaultInfo {
|
||||
sample_spec: info.sample_spec,
|
||||
channel_map: info.channel_map,
|
||||
|
|
Загрузка…
Ссылка в новой задаче