From c7f39740d808bdf98ab968af270fd447d3cfea86 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 9044944..b735d63 100644 --- a/codec_context.go +++ b/codec_context.go @@ -340,6 +340,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 (