Commit a73013e4 authored by Lars Wireen's avatar Lars Wireen

rtsp-media: Fix race codition in finish_unprepare

The previous fix for race condition around finish_unprepare where the
function could be called twice assumed that the status wouldn't change
during execution of the function. This assumption is incorrect as the
state may change, for example if an error message arrives from the
pipeline bus.

Instead a flag keeping track on whether the finish_unprepare function
is currently executing is introduced and checked.

Fixes gstreamer/gst-rtsp-server#59
parent 3be1b9bb
Pipeline #16282 passed with stages
in 16 minutes and 6 seconds