miniobject: avoid race in bufferpool release
authorWim Taymans <wim.taymans@collabora.co.uk>
Mon, 25 Jul 2011 10:53:10 +0000 (12:53 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 25 Jul 2011 10:53:10 +0000 (12:53 +0200)
commitee235a6b070bc386fa545f02f850624736e2b07e
treef92e6746158b620ee7162880e4943b52d3aff3ac
parentc887dd41f82bff347bc3713fea18bc05d48feaab
miniobject: avoid race in bufferpool release

Avoid playing with the refcount to decide when a buffer has been recycled by the
dispose function. The problem is that we then temporarily can have a buffer with
a refcount > 1 being acquired from the pool, which is not writable. Instead use
a simple boolean return value from the dispose function to inform the called
that the object was recycled or not.
gst/gstbuffer.c
gst/gstminiobject.c
gst/gstminiobject.h