unlock_stop() is expected to be run while the streaming thread is idle. To guaranty this is the case, we should take the streamlock, but its not possible to take this lock during state transitions from PAUSED to PLAYING as the wait function that we want to terminate is holding it. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4961>