[FFmpeg-devel] Race conditions in libavcodec/pthread.c
uoti.urpala at pp1.inet.fi
Fri Aug 26 01:30:21 CEST 2011
On Thu, 2011-08-25 at 15:55 -0700, Aaron Colwell wrote:
> The thing is that state is modified by the main thread (submit_packet()) &
> worker threads (frame_worker_thread()). It needs lock protection to avoid
> race conditions. I agree it's a non-trivial change to fix this. That's why I
> wanted to ping the list first.
Are you sure that causes race conditions? The variable is "owned" by
different threads in turn; I don't see how they'd overwrite each other's
changes at least.
> I figured it was worth a discussion before diving in. :)
If you want to discuss it with the people who have worked on the code
you should post to libav-devel.
More information about the ffmpeg-devel