diff options
author | wm4 <nfxjfg@googlemail.com> | 2017-03-23 13:18:16 +0100 |
---|---|---|
committer | wm4 <nfxjfg@googlemail.com> | 2017-03-27 13:21:15 +0200 |
commit | 9e703ae30f911d4df3f80647266e65d3b2dcf30d (patch) | |
tree | 85038571cc93f144555c1a39f8f879fd0d7a14fc /Changelog | |
parent | ddef3d902f0e4cbd6be6b3e5df7ec158ce51488b (diff) | |
download | ffmpeg-9e703ae30f911d4df3f80647266e65d3b2dcf30d.tar.gz |
pthread_frame: do not attempt to unlock a mutex on the wrong thread
async_mutex has is used in a very strange but intentional way: it is
locked by default, and unlocked only in regions that can be run
concurrently.
If the user was calling API functions to the same context from different
threads (in a safe way), this could unintentionally unlock the mutex on
a different thread than the previous lock operation. It's not allowed by
the pthread API.
Fix this by emulating a binary semaphore using a mutex and condition
variable. (Posix semaphores are not available on all platforms.)
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'Changelog')
0 files changed, 0 insertions, 0 deletions