[FFmpeg-devel] [PATCH] avutil: fix data race in av_get_cpu_flags().

Jean-Yves Avenard jyavenard at gmail.com
Thu Nov 24 14:31:43 EET 2016


Hi.

Mozilla also fixed some data races in pthread_frames.c which you may want
to look at. It's very similar to problem you mentioned

We made the code conditional on being in an TSan build.
https://dxr.mozilla.org/mozilla-central/source/media/ffvpx/libavcodec/pthread_frame.c#46

Sorry, using the new gmail app, not allowing me to reply inline. I can only
top post.

Jean-Yves

Le jeu. 24 nov. 2016 à 06:47, Wan-Teh Chang <wtc-at-google.com at ffmpeg.org>
a écrit :

> On Tue, Nov 22, 2016 at 3:30 PM, wm4 <nfxjfg at googlemail.com> wrote:
> > On Tue, 22 Nov 2016 23:57:15 +0100
> > Michael Niedermayer <michael at niedermayer.cc> wrote:
> >
> >> For example the progress code in the frame threading.
> >
> > Which was recently fixed in Libav AFAIR...
>
> You're right. libav/libavcodec/pthread_frame.c has code similar to my
> ffmpeg patch
> http://ffmpeg.org/pipermail/ffmpeg-devel/2016-March/190454.html,
> and much more.
>
> Note: libav/libavcodec/pthread_frame.c uses unnecessary (too strong)
> memory barriers in ff_thread_report_progress(). We can fix those when
> the code is merged to ffmpeg.
>
> Wan-Teh Chang
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list