omxbufferpool: fix race when releasing input buffers
authorGuillaume Desmottes <guillaume.desmottes@collabora.com>
Mon, 7 Jan 2019 12:29:37 +0000 (13:29 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.com>
Tue, 8 Jan 2019 15:04:31 +0000 (16:04 +0100)
commit9dc359d0c1bd2811ef3f635de0812b5217444b61
treeec7b3d877317fa52c95a0d7d602b37bb09b4ceeb
parent3828d9769c74e3c66342a1f78848397982ac2f6e
omxbufferpool: fix race when releasing input buffers

If buffers were released from the pool while
gst_omx_video_enc_handle_frame() was waiting for new buffers,
gst_omx_port_acquire_buffer() was never awaken as the buffers weren't
released through OMX's messaging system.

GQueue isn't thread safe so also protect it with the lock mutex.
omx/gstomx.c
omx/gstomx.h
omx/gstomxbufferpool.c