diff --git a/filter_context.go b/filter_context.go index 6fe2248..8232046 100644 --- a/filter_context.go +++ b/filter_context.go @@ -46,7 +46,7 @@ func (fc *FilterContext) SetHardwareDeviceContext(hdc *HardwareDeviceContext) { C.av_buffer_unref(&fc.c.hw_device_ctx) } if hdc != nil { - fc.c.hw_device_ctx = hdc.c + fc.c.hw_device_ctx = C.av_buffer_ref(hdc.c) } else { fc.c.hw_device_ctx = nil }