A system and method for handling errors is provided. Errors related to the processing
and storage of inverse discrete cosine transform (IDCT) image data cause hardware
to become stalled. Stalled hardware may result in multiple image frames being dropped
or lost during video playback. To avoid the stalling of hardware, the hardware
is used to analyze the data being processed. Data being stored may be analyzed
to determine if any error-characteristics, such as overflow or underflow, are present
in the storing of the data. The data is manipulated to avoid stalling due to the error-characteristics.