queue2: do not post buffering messages holding the lock
authorThiago Santos <thiagoss@osg.samsung.com>
Fri, 19 Sep 2014 15:02:46 +0000 (12:02 -0300)
committerThiago Santos <thiagoss@osg.samsung.com>
Fri, 19 Sep 2014 23:35:29 +0000 (20:35 -0300)
commitecf479e3d1885c41208ca0df7c7d4b6d3e2d2af7
tree584c92fe2d3165b8c0123301accfec23556aa08e
parent7a93e6b005ed821b62a0e02361752dc441c17f37
queue2: do not post buffering messages holding the lock

It might cause deadlocks to post messages while holding the queue2
lock. To avoid this a new boolean flag is set whenever a new
buffering percent is found. The message is posted after the lock
is released.

To make sure the buffering messages are posted in the right order, messages
are posted holding another lock. This prevents 2 threads trying to post
messages at the same time.

https://bugzilla.gnome.org/show_bug.cgi?id=736969
plugins/elements/gstqueue2.c
plugins/elements/gstqueue2.h