Fix race condition when streaming MP2TS to media server

Data transfer between user space and the media server of MP2TS
 packets is done through a queue of buffers. This queue tells
 the OpenMAX AL player whenever a buffer is available to be filled
 so it can be transferred.
 When the player is destroyed, this queue is cleared; this is
 indicated by the boolean mBuffersHasBeenSet whose role is to
 store whether the queue is properly configured.
There is a race condition where the queue could be cleared right
 as the availability of a buffer is signaled.
The fix is to only try to use the available buffer when
 mBuffersHasBeenSet is true.

Bug 6971102

Change-Id: Ibbe8f58fc954b84bf560f29944d1018dab261895
1 file changed
tree: e918286f44fdbca52dd17dc78c7048c735a2627e
  1. doc/
  2. include/
  3. src/
  4. tests/
  5. tools/