From e521315c68a8b388a6a8e5951975fa8c0ffd8117 Mon Sep 17 00:00:00 2001 From: l0rem1psum Date: Mon, 4 Nov 2024 08:26:26 +0000 Subject: [PATCH] feat: expose pointer to underlying C object --- codec_context.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/codec_context.go b/codec_context.go index 5ea3044..3758d43 100644 --- a/codec_context.go +++ b/codec_context.go @@ -349,6 +349,10 @@ func (cc *CodecContext) SetExtraHardwareFrames(n int) { cc.c.extra_hw_frames = C.int(n) } +func (cc *CodecContext) UnsafePointer() unsafe.Pointer { + return unsafe.Pointer(cc.c) +} + type CodecContextPixelFormatCallback func(pfs []PixelFormat) PixelFormat var (