Patent ID: 8526501

Claim:
A decoder for outputting video and audio based on stream data, comprising: a time information generator which generates reference time information whose value increases with time; a video decoder which decodes, when receiving a video stream, the incoming video stream to generate video data, the video stream being obtained by encoding video data and being attached with video output time information indicating an output time of video per video frame, and which extracts the video output time information attached to each video frame; an audio decoder which decodes, when receiving an audio stream, the incoming audio stream to generate audio data, the audio stream being obtained by encoding audio data and being attached with audio output time information indicating an output time of audio per audio frame, and which extracts the audio output time information attached to each audio frame; a difference value calculator which calculates a difference value between an occurrence time of a synchronizing signal indicating an output timing of video and the video output time information; an audio output time corrector which corrects, using the difference value calculated by the difference value calculator, the audio output time information attached to each audio frame; an output start time determining unit which compares values of a first video output time information extracted from a first video frame and a first audio output time information extracted from a first audio frame, and which determines, when the value of the first video output time information is larger than that of the first audio output time information, that a time indicated by the first video output time information is an audio output start time; a video source which outputs video upon each occurrence of the synchronizing signal based on a previously defined relationship between a value of the reference time information upon occurrence of the synchronizing signal and a range of the video output time information that can be displayed upon the occurrence of the synchronizing signal, the video being represented by a video frame attached with the video output time information that can be displayed based on a value of the reference time information upon the occurrence of the synchronizing signal; and an audio source which replaces generated audio with invalid data before a time indicated by the reference time information reaches the audio output start time, and which outputs audio when a value of the reference time information and a corrected value of the audio output time information are synchronized, the audio being represented by an audio frame with the synchronized audio output time information.