Re: [FFmpeg-devel] [PATCH] avcodec/jpeg2000dec: Move preparations to main thread, fix race

2022-01-28 Thread Andreas Rheinhardt
Andreas Rheinhardt: > jpeg2000_decode_tile() (which is run concurrently by several threads > when using slice threading) currently modifies some joint values > before doing its actual work. This is a data race that happens to work > because all threads set the same values; but it is nevertheless >

[FFmpeg-devel] [PATCH] avcodec/jpeg2000dec: Move preparations to main thread, fix race

2022-01-27 Thread Andreas Rheinhardt
jpeg2000_decode_tile() (which is run concurrently by several threads when using slice threading) currently modifies some joint values before doing its actual work. This is a data race that happens to work because all threads set the same values; but it is nevertheless undefined behaviour. Fix this