If the property stolen or embezzled has not been delivered to the owner, the court before which a trial is had for stealing or embezzling it, upon the application of the owner to the court and on proof of his title, after reasonable notice and opportunity to be heard has been given to the person from whom custody of the property was taken and any other person as required by the court, may order it to be restored to the owner without prejudice to the state.
Ca. Pen. Code § 1410