[vlc-devel] [vlc-commits] picture_pool: fix race condition
thomas at gllm.fr
Fri Oct 31 15:23:18 CET 2014
On Fri, Oct 31, 2014, at 11:47, Rémi Denis-Courmont wrote:
> Le 2014-10-31 13:40, Thomas Guillem a écrit :
> > I don't understand well that part of the code, so I trust you and
> > your
> > code.
> But there is nothing to understand... The semantics of the function are
> Literally, the change replaces this pseudocode:
> if (refs > 0) /* atomic_load */
> refs += 1; /* picture_Hold() */
> with equivalent but actually atomic pseudocode:
> if (refs != 0)
> refs = 1;
Ok, I thought picture_Hold was doing more stuff than just a ref++.
When I revert this patch, I got a correct behavior, but finally I think
it's unrelated. I'm on it.
> Rémi Denis-Courmont
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel