This bug is a usability issue for the Fifo element that is present in all
versions of DMAI.
When Fifo_flush is called it causes all subsequent calls to Fifo_get to be given
a return value of DMAI_EFLUSH but does not return an actual buffer pointer.
This can lead to a memory leak on systems where there are buffers in the Fifo
and it is being shutdown. Once the user calls Fifo_flush they will not get any
of the buffers that remain on the Fifo and will then tear down the Fifo. At
this point any buffers left of the Fifo will not be freed. Fifo_flush should
push a dummy buffer onto the Fifo to wake up any processes waiting on the Fifo.
Fifo_get should only return Dmai_EFLUSH when the buffer to be returned is the
dummy buffer that was pushed on by the flush call.
This was found using GStreamer. A patch to work around the issue in GStreamer
can be found in the patches tracker as item 499