mirror of
https://github.com/asticode/go-astiav.git
synced 2025-11-03 02:33:18 +08:00
Added extra data to codec context
This commit is contained in:
@@ -128,6 +128,17 @@ func (cc *CodecContext) ColorTransferCharacteristic() ColorTransferCharacteristi
|
||||
return ColorTransferCharacteristic(cc.c.color_trc)
|
||||
}
|
||||
|
||||
func (cc *CodecContext) ExtraData() []byte {
|
||||
return bytesFromC(func(size *C.size_t) *C.uint8_t {
|
||||
*size = C.size_t(cc.c.extradata_size)
|
||||
return cc.c.extradata
|
||||
})
|
||||
}
|
||||
|
||||
func (cc *CodecContext) SetExtraData(b []byte) error {
|
||||
return setBytesWithIntSizeInC(b, &cc.c.extradata, &cc.c.extradata_size)
|
||||
}
|
||||
|
||||
func (cc *CodecContext) Flags() CodecContextFlags {
|
||||
return CodecContextFlags(cc.c.flags)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user