In this paper, we present a dynamic thermal management (DTM) algorithm based on: 1) accurate estimation of the workload of frames in a group of pictures (GOP) in an MPEG-2 video stream and 2) slack borrowing across the GOP frames in order to achieve a thermally safe state of operation in microprocessors during the video decoding process. The proposed DTM algorithm employs dynamic voltage and frequency scaling (DVFS) while considering the frame-rate-dependent GOP deadline, variance of the frame decoding times within the GOP, and a maximum chip temperature constraint. If it becomes necessary to sacrifice video quality or violate the GOP deadline due to a low temperature bound, then the (intra-frame) spatial quality degradation and the (inter-frame) temporal quality degradation will be applied to the GOP. Experimental results demonstrate the competence and efficiency of the proposed online DTM algorithm.Index Terms-Dynamic thermal management (DTM), dynamic voltage and frequency scaling (DVFS), group of pictures (GOP), MPEG-2 decoding, quality degradation.