VideoDecoder::needsUpdate() only returns true if there are frames
remaining to be rendered. This won't work for video files that are
audio-only, so in the event of a such a file, fall back to checking
endOfVideo() which includes audio tracks.
Fixes audio-only DigitalVideoCastMembers in the Director engine.
Fixes playback of the cupcake song in Chop Suey.
Remove unused integer _frameDelay:
Fixes COVERITY: 1476344
Initialize Non-static class members on PacoDecoder:
Fixes COVERITY: 1476353
Resource leak in object No destructor on PacoAudioTrack:
Fixes COVERITY: 1476360
Fix memory leak in handleFrame. Delete copied data in fdata.
Fixes an error when playing a QuickTime video that has a mediaTime set
on its first edit. This was caused by mediaTime changes in:
ef184a6cef98a1756c0669a03fa9b6fa2386b6e7
Those changes buffered frames during initialization so that the keyframe
and other frames don't play instead of the intended start frame that
mediaTime specifies. My mistake was that decoding isn't allowed during
VideoDecoder::loadStream(); VideoDecoder::setDitheringPalette() requires
that no frames have been decoded yet, and at least Director and Mohawk
call that.
Now the initial mediaTime buffering is delayed until the first decode.
Fixes bug #13479 where certain Myst videos error.
Fixes the opening movie in the Director game Chop Suey.
The amount of lines to skip is in `len`. This wasn't taken into account
when decoding the endcurrentline opcode.
Thanks to Kostya for resolving the issue.
A PACo 'frame' has both the audio and video part of the frame. Where decodeNextFrame only handles video, readNextPacket enables the option to read a PACo frame and decode and queue both audio and video.
Move the VideoTrack to FixedRateVideoTrack. It handles frame duration
internally and removes the need to use nextFrameStartTime accounting.
Add getPalette function.
The code decodes PACo video frames.
Other features, such as audio and palette changes are detected
but not handled.
Format documentation: https://wiki.multimedia.cx/index.php?title=PACo
Thanks to Kostya for reverse engineering the format and the original C
code.