public virtual Surface DecodeNextFrame()
{
_needsUpdate = false;
ReadNextPacket();
// If we have no next video track at this point, there shouldn't be
// any frame available for us to display.
if (_nextVideoTrack == null)
{
return(null);
}
Surface frame = _nextVideoTrack.DecodeNextFrame();
if (_nextVideoTrack.HasDirtyPalette())
{
Palette = _nextVideoTrack.GetPalette();
HasDirtyPalette = true;
}
// Look for the next video track here for the next decode.
FindNextVideoTrack();
return(frame);
}