pad: Fix problem with destroy callback not being called
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 23 Dec 2009 20:20:14 +0000 (21:20 +0100)
committerWim Taymans <wim@metal.(none)>
Wed, 23 Dec 2009 20:20:14 +0000 (21:20 +0100)
commit381d35fd1edb369becf8b15dd9d0cd066fd2ee7e
tree206c7536265f3a637c0260db053c6f3ba45f1897
parent5e577aa385398bac19404a871a491c2330a08618
pad: Fix problem with destroy callback not being called

When we unblock a pad with the same user_data, the destroy callback is not
called. This leads to refcounting leaks that cannot be avoided. Instead always
call the destroy notify whenever we install a new pad block.
In particular, this fixes a nasty pad leak in decodebin2.

Also update the unit test to have more accurate comments and test the required
behaviour.
gst/gstpad.c
tests/check/gst/gstpad.c