Skip to content

thumbnail: rework API to fix use-after-free

Thomas Guillem requested to merge tguillem/vlc:thumbnail-fix-2 into master

Before 3b26eefc, the caller was not responsible to destroy the request but he could cancel it via:

vlc_thumbnailer_Cancel() WaitForTheCb() ReleaseResourceAssociatedWithTheCb()

This new commit, in addition with 3b26eefc (that was not complete), allow the user to cancel/destroy the request, without waiting for any callback:

vlc_thumbnailer_DestroyRequest() ReleaseResourceAssociatedWithTheCb()

vlc_thumbnailer_Cancel() has been renamed to vlc_thumbnailer_DestroyRequest(), this new call must always be called to release resources and can be called before receiving the callback in order to cancel it.

Fixes #27766 (closed)

Edited by Thomas Guillem

Merge request reports