From: David Svensson Fors Date: Mon, 15 Apr 2013 10:21:54 +0000 (+0200) Subject: client: send out teardown signal before tearing down X-Git-Tag: 1.19.3~495^2~1155 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bba7c4042d1d0384affa0f94ae0cff7c1a2c9908;hp=825d6f0b5190a465ad31dd17c83cc691bc2f421a;p=platform%2Fupstream%2Fgstreamer.git client: send out teardown signal before tearing down The advantage is that in the signal handler you get direct access to information about what streams are about to get torn down (in the GstRTSPClientState). Fixes https://bugzilla.gnome.org/show_bug.cgi?id=697686 --- diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c index af07253..5b5affe 100644 --- a/gst/rtsp-server/rtsp-client.c +++ b/gst/rtsp-server/rtsp-client.c @@ -662,6 +662,10 @@ handle_teardown_request (GstRTSPClient * client, GstRTSPClientState * state) state->sessmedia = media; + /* we emit the signal before closing the connection */ + g_signal_emit (client, gst_rtsp_client_signals[SIGNAL_TEARDOWN_REQUEST], + 0, state); + /* unlink the all TCP callbacks */ unlink_session_transports (client, session, media); @@ -685,10 +689,6 @@ handle_teardown_request (GstRTSPClient * client, GstRTSPClientState * state) send_response (client, session, state->response, TRUE); - /* we emit the signal before closing the connection */ - g_signal_emit (client, gst_rtsp_client_signals[SIGNAL_TEARDOWN_REQUEST], - 0, state); - return TRUE; /* ERRORS */