media: release the state lock when going to NULL
authorWim Taymans <wtaymans@redhat.com>
Tue, 8 Apr 2014 12:49:41 +0000 (14:49 +0200)
committerWim Taymans <wtaymans@redhat.com>
Tue, 8 Apr 2014 12:49:41 +0000 (14:49 +0200)
commitfd5e949169d71fe23102d6120853e28ef45f5ae4
tree63864eae29b4a6396b7b86a7a46a827ec9ed2baa
parent7f40d3d87f4a1f49a3a69f8374f56f4bde2d1918
media: release the state lock when going to NULL

Set our state to UNPREPARING and release the state-lock before
setting the pipeline to the NULL state. This way, any pad-added
callback will be able to take the state-lock and check that we are now
unpreparing instead of deadlocking.

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