OSDN Git Service
Fix hang under BufferQueue::disconnect
disconnect() tries to drain the queue, but there are error cases in
the wild where the consumer has "lost" the BufferQueue object and
stopped consuming frames. That causes a deadlock situation where
disconnect (itself called from under cleanup code,
e.g. eglDestroySurface()) never returns and hangs the process.
Fix this by detecting (with a timeout) the case of a queue that fails
to drain promptly and convert it to an existing error, basically
treating it the same as "abandoned".
Issue: AXIA-582
Change-Id: I313f7fb038e6f61d02a23c3b0d4b6951c54d9f20
Signed-off-by: Andy Ross <andy.ross@windriver.com>