Commit 56a72587 authored by Alessandro Decina's avatar Alessandro Decina

gst.GhostPad: allow set_target(None) to unset the target. Fixes #590735.

parent 35fe0f41
......@@ -2529,7 +2529,7 @@
(c-name "gst_ghost_pad_set_target")
(return-type "gboolean")
'("GstPad*" "newtarget")
'("GstPad*" "newtarget" (null-ok))
......@@ -177,5 +177,18 @@ class PipeTest(TestCase):
gst.debug('received handoff on pad %r' % pad)
self._handoffs += 1
class TargetTest(TestCase):
def test_target(self):
src = gst.Pad("src", gst.PAD_SRC)
ghost = gst.GhostPad("ghost_src", src)
self.failUnless(ghost.get_target() is src)
self.failUnless(ghost.get_target() is None)
self.failUnless(ghost.get_target() is src)
if __name__ == "__main__":
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment