client: manage media in session as a last step
authorWim Taymans <wtaymans@redhat.com>
Tue, 8 Jul 2014 10:36:12 +0000 (12:36 +0200)
committerWim Taymans <wtaymans@redhat.com>
Tue, 8 Jul 2014 12:46:13 +0000 (14:46 +0200)
commit5aec4af1b96ef5bddfc02a015e9cec3488c89f4a
tree20af1e7997b81087978be3f5430957ebe5bc33ee
parentfc6fa3f16a9f98e477442dd2630602e6ddffe266
client: manage media in session as a last step

Once we manage a media in a session, we can't unmanage it anymore
without destroying it. Therefore, first check everything before we
manage the media, otherwise if something is wrong we have no way to
unmanage the media.
If we created a new session and something went wrong, remove the session
again. Fixes a leak in the unit test.
gst/rtsp-server/rtsp-client.c
gst/rtsp-server/rtsp-session.c
tests/check/gst/client.c