util/channel_layout: add default constructor
This commit is contained in:
parent
9f87ecf5fa
commit
fc693f8bfc
@ -68,4 +68,10 @@ impl ChannelLayout {
|
||||
av_get_channel_layout_nb_channels(self.bits())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn default(number: i32) -> ChannelLayout {
|
||||
unsafe {
|
||||
ChannelLayout::from_bits_truncate(av_get_default_channel_layout(number) as c_ulonglong)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user