diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2017-04-03 09:48:53 -0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2017-04-03 09:48:53 -0400 |
commit | 1269cd5b6f540bef5913bf134d2f461aac50d70b (patch) | |
tree | 040c768b7b4f885adffca8dd53ccbc96e18f82b9 /libavfilter/vf_removelogo.c | |
parent | 76d8c77430e9e0110623705bfb54d922cc2ac3ea (diff) | |
download | ffmpeg-1269cd5b6f540bef5913bf134d2f461aac50d70b.tar.gz |
pthread_frame: call update_context_from_user() after acquiring lock.
Otherwise the thread may still be in the middle of decoding a previous
frame, which would effectively trigger a race condition on any field
concurrently read and written.
In practice, this fixes tsan warnings like the following:
WARNING: ThreadSanitizer: data race (pid=17380)
Write of size 4 at 0x7d64000160fc by main thread:
#0 update_context_from_user src/libavcodec/pthread_frame.c:335 (ffmpeg+0x000000dca515)
[..]
Previous read of size 4 at 0x7d64000160fc by thread T2 (mutexes: write M1821):
#0 ff_thread_report_progress src/libavcodec/pthread_frame.c:565 (ffmpeg+0x000000dcb08a)
Diffstat (limited to 'libavfilter/vf_removelogo.c')
0 files changed, 0 insertions, 0 deletions