[vlc-devel] RFC: vout: spu: /* You cannot delete subpicture outside of SpuSelectSubpictures */

Thomas Guillem thomas at gllm.fr
Wed Jun 5 08:04:19 CEST 2019


Hi,

When working on https://trac.videolan.org/vlc/ticket/22273

I encountered this comment: "/* You cannot delete subpicture outside of SpuSelectSubpictures */ " inside the spu_ClearChannel() function. It complicates everything.

SpuSelectSubpictures() is called from spu_Render(). Deleting a subpicture can cause the pf_destroy updater callback to be called. I assume that, historically or not, such callbacks must have been called from the same context that spu_Render().
Is it still the case ? This is not many comment in this part of the code.

By the way, subpictures can also be destroyed from spu_Destroy() (when the vout is destroyed) if the spu_t is cleared but spu_Render() is not called after.


More information about the vlc-devel mailing list