allow nullable target for ghost pads

This commit is contained in:
RSWilli
2025-05-28 18:33:57 +02:00
parent 23dd3a64da
commit 3a1d70d48c

View File

@@ -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,
))
}