On 10/22/2017 10:08 AM, Derek Buitenhuis wrote:
> On 10/22/2017 2:03 PM, James Almer wrote:
>> This prevents data races in av_crc_get_table()
>>
>> Signed-off-by: James Almer <jamr...@gmail.com>
>> ---
>>  libavutil/Makefile     |    1 +
>>  libavutil/crc.c        |  295 +-------------
>>  libavutil/crc_tables.c | 1030 
>> ++++++++++++++++++++++++++++++++++++++++++++++++
>>  libavutil/crc_tables.h |   33 ++
>>  4 files changed, 1066 insertions(+), 293 deletions(-)
>>  create mode 100644 libavutil/crc_tables.c
>>  create mode 100644 libavutil/crc_tables.h
> 
> Can this be generated at init, or lazily, using ff_thread_once instead of
> hardcoding huge tables?
> 
> - Derek

It was suggested, but nobody gave it a try (Or they did but found it
wasn't as simple as first thought?).

Thread sanitizer complains about this in every other run, and the tables
are at most 1k each, so this is not a bad solution and can be replaced
by ff_thread_once in the future.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to