Skip to content

va_surface: fix potential double use of a buffer

Steve Lhomme requested to merge robUx4/vlc:va-surface-race into master

Substracting 1 to refcount first, means it goes back to unused state temporarily. It may be picked by another thread as well before calling atomic_fetch_sub().

In the end we don't need the -1,+1 it's already in the "used once" state (2) after the atomic_compare_exchange() call.

Merge request reports

Loading