On Funai, Hitachi, Magnavox, Philips, Symphonic and Sylvania the cassette ejects when you hit the power button after you noticed it went dead. THE CURE - Replace the Infrared diode. Most of them have less than three. There are no more flat belts on the capstan and the tiny counter belts have vanished entirely. Fewer belts does mean fewer problems, however, pesky problems can still occur when the rubber becomes marginal.
Belts can cause a number of symptoms depending on which belt is failing.
First inspect for belts that may have broken or popped off. Then closely scrutinize for cracks or glazing. If in doubt, you may want to replace all of them. They are now inexpensive and easy to replace on most models. Cassettes with less tape work normal.