diff --git a/gst/gst_ghost_pad.go b/gst/gst_ghost_pad.go index dfe9d9b..57f241c 100644 --- a/gst/gst_ghost_pad.go +++ b/gst/gst_ghost_pad.go @@ -123,8 +123,14 @@ func (g *GhostPad) GetTarget() *Pad { // SetTarget sets the new target of the ghostpad gpad. Any existing target is unlinked and links to the new target are // established. if newtarget is nil the target will be cleared. func (g *GhostPad) SetTarget(target *Pad) bool { + var ctarget *C.GstPad + + if target != nil { + ctarget = target.Instance() + } + return gobool(C.gst_ghost_pad_set_target( - g.Instance(), target.Instance(), + g.Instance(), ctarget, )) }