Skip to content

d3dvideosink: concurrency improvements

We fix a number of race conditions in the sink by simplifying locking and ensuring that we can start or stop the sink without temporarily releasing the class lock, as this is doomed to eventual race condition. This solution doesn't require an extra lock object, but rather makes use of the existing class lock to make stop atomic. After the final commit in the MR, we never have relinquish the class lock in the middle of a method to avoid deadlock, so we avoid race conditions that plague the current implementation. With these changes, 16 sinks can be started and stopped concurrently without any access violation or other noticeable race. Fixes #404 (closed).

Note for reviewers: this MR has many commits, but each one is small and easy to grok.

Edited by Aaron Boxer

Merge request reports

Loading