IIRC Cosby’s lawyers were assured he could give the deposition without prosecution.
New DA says screw that.
If they pull that on Cosby they can do it to me or you. A agreement with a DA and your attorney needs to have validity.
Nevertheless, Cosby served several years hard time. He got punishment for his crimes.