omx: Use the EOS flag to handle flushing at the end