]> git.sesse.net Git - ffmpeg/commit
Move the |die| member of FrameThreadContext to PerThreadContext.
authorWan-Teh Chang <wtc-at-google.com@ffmpeg.org>
Tue, 1 Mar 2016 18:11:53 +0000 (10:11 -0800)
committerRonald S. Bultje <rsbultje@gmail.com>
Tue, 1 Mar 2016 18:53:47 +0000 (13:53 -0500)
commit4845f0720e38c5baab7baad52bfce1451f1c1639
treed499e3f085f3efd2ee4dd3f82f9cb13cfce2abb1
parentf1148390d7ed0444f3204d10277d09cc8d034e65
Move the |die| member of FrameThreadContext to PerThreadContext.

This fixes a data race warning by ThreadSanitizer.
FrameThreadContext.die is read by all the worker threads but is not
protected by any mutex. Move it to PerThreadContext so that each worker
thread reads its own copy of |die|, which can then be protected with
PerThreadContext.mutex.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
libavcodec/pthread_frame.c