mirror of
https://github.com/asticode/go-astiav.git
synced 2025-10-05 16:16:50 +08:00
Removed pointer on ChannelLayout + now cloning channel layouts in getters
This commit is contained in:
@@ -28,11 +28,12 @@ func (cp *CodecParameters) BitRate() int64 {
|
||||
return int64(cp.c.bit_rate)
|
||||
}
|
||||
|
||||
func (cp *CodecParameters) ChannelLayout() *ChannelLayout {
|
||||
return newChannelLayoutFromC(&cp.c.ch_layout)
|
||||
func (cp *CodecParameters) ChannelLayout() ChannelLayout {
|
||||
l, _ := newChannelLayoutFromC(&cp.c.ch_layout).clone()
|
||||
return l
|
||||
}
|
||||
|
||||
func (cp *CodecParameters) SetChannelLayout(l *ChannelLayout) {
|
||||
func (cp *CodecParameters) SetChannelLayout(l ChannelLayout) {
|
||||
l.copy(&cp.c.ch_layout) //nolint: errcheck
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user