[FFmpeg-devel] [PATCH] lavd/sdl: make cross-thread flags volatile

Lukasz M lukasz.m.luki at gmail.com
Fri Feb 7 17:21:59 CET 2014

On 7 February 2014 16:57, Nicolas George <george at nsup.org> wrote:

> 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.

 TBH it is not my strong domain, but you are probably right it does nothing
useful here so dropped for now.

More information about the ffmpeg-devel mailing list