diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2017-04-06 13:58:59 -0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2017-04-07 13:29:45 -0400 |
commit | 2e664b9c1e73c80aab91070c1eb7676f04bdd12d (patch) | |
tree | f30e53473e4c16ac5f9cb0572c35b9d72ace4d02 /tests/ref/fate/vp9-03-size-198x198 | |
parent | 7f05c5cea04112471d8147487aa3b44141922d09 (diff) | |
download | ffmpeg-2e664b9c1e73c80aab91070c1eb7676f04bdd12d.tar.gz |
pthread_frame: make accesses to debug field be protected by owner lock.
The av_log() is done outside the lock, but this way the accesses to the
field (reads and writes) are always protected by a mutex. The av_log()
is not run inside the lock context because it may involve user callbacks
and doing that in performance-sensitive code is probably not a good idea.
This should fix occasional tsan warnings when running fate-h264, like:
WARNING: ThreadSanitizer: data race (pid=10916)
Write of size 4 at 0x7d64000174fc by main thread (mutexes: write M2313):
#0 update_context_from_user src/libavcodec/pthread_frame.c:335 (ffmpeg+0x000000df7b06)
[..]
Previous read of size 4 at 0x7d64000174fc by thread T1 (mutexes: write M2311):
#0 ff_thread_await_progress src/libavcodec/pthread_frame.c:592 (ffmpeg+0x000000df8b3e)
Diffstat (limited to 'tests/ref/fate/vp9-03-size-198x198')
0 files changed, 0 insertions, 0 deletions