rtsp-media: Do not prepare media after media times out
authorSebastian Rasmussen <sebras@hotmail.com>
Tue, 22 Dec 2015 11:08:02 +0000 (12:08 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 28 Dec 2015 12:08:09 +0000 (14:08 +0200)
commitb2abb970435e618e8475c7d8060142cec4673dbe
tree1dd094f69f1c0e5cafc9ce2b7b01d8e30678cdfb
parentc8f179948ec18e44fe8018d8ae8f2c0833905f29
rtsp-media: Do not prepare media after media times out

Deferred calls to start_prepare() can be deferred past the point until
which wait_preroll() and by proxy gst_rtsp_media_get_status() is
prepared to wait. Previously there was no lock and no check for this
situation. This meant that a media could be prepared and unprepared
simultaneously by two different threads. Now a lock is in place and a
suitable check is done.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=759773
gst/rtsp-server/rtsp-media.c