[FFmpeg-devel] [PATCH] lavd/sdl: make cross-thread flags volatile
george at nsup.org
Fri Feb 7 16:57:27 CET 2014
Le nonidi 19 pluviôse, an CCXXII, Lukasz Marek a écrit :
> Signed-off-by: Lukasz Marek <lukasz.m.luki at gmail.com>
> libavdevice/sdl.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Does it fix anything in real-world? As far as I know, volatile is not enough
to ensure inter-threads synchronization in SMP environments: the variable
could be updated in what the compiler sees as the structure in memory, but a
memory barrier is necessary to ensure this change is forwarded from the
core's cache to the common memory.
I still need to look at what synchronization primitives were added in lavu
for the refcounted frames API.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: Digital signature
More information about the ffmpeg-devel