Files
FFmpeg/libavcodec
Ronald S. Bultje b51217381d 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)

(cherry picked from commit 1269cd5b6f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-13 02:29:26 +02:00
..
2017-03-31 12:28:58 +02:00
2017-03-20 09:23:15 +01:00
2017-03-28 18:04:27 -04:00
2017-03-28 18:04:27 -04:00
2017-03-21 12:38:20 +01:00
2017-04-11 23:39:21 +02:00
2017-04-02 19:49:45 +02:00
2017-03-21 20:54:27 +01:00