[FFmpeg-devel] [PATCH] Fix threaded mpeg*video encoding

Måns Rullgård mans
Thu Jul 1 05:01:24 CEST 2010


Michael Niedermayer <michaelni at gmx.at> writes:

> On Wed, Jun 30, 2010 at 03:49:34PM +0100, Mans Rullgard wrote:
>> This allocates per-thread copies of some buffers which are updated
>> concurrently from the encoding threads.
>
> almost all buffers are updated concurrently from the threads

If several threads are using the same memory locations concurrently,
there is a problem.

> some of what you change doesnt look like its even used by encoders
> though
>
> is this fixing a bug?
> if so please elaborate what and where. My guess would be toward
> ac_val being the one causing the issues.

The threaded regression tests are failing randomly with pthreads enabled:

http://fate.multimedia.cx/index.php?test_result=66882641
http://fate.multimedia.cx/index.php?test_result=66852547
http://fate.multimedia.cx/index.php?test_result=66876769

Those are just a few examples.  Valgrind complained about most of
those buffers, particularly ac_val and dc_val, and I add a couple
since they were written close to the places valgrind identified.  Race
detection is never exact.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list