mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
rtspclientsink: Handle the KeyMgmt header in ANNOUNCE response
This in order to be able to decrypt the RTCP backchannel https://bugzilla.gnome.org/show_bug.cgi?id=794813
This commit is contained in:
parent
ae0e08dac2
commit
c683cadcdf
1 changed files with 18 additions and 0 deletions
|
@ -4232,6 +4232,8 @@ gst_rtsp_client_sink_record (GstRTSPClientSink * sink, gboolean async)
|
|||
GstSDPMessage *sdp;
|
||||
guint sdp_index = 0;
|
||||
GstSDPInfo info = { 0, };
|
||||
gchar *keymgmt;
|
||||
guint i;
|
||||
|
||||
const gchar *proto;
|
||||
gchar *sess_id, *client_ip, *str;
|
||||
|
@ -4338,6 +4340,17 @@ gst_rtsp_client_sink_record (GstRTSPClientSink * sink, gboolean async)
|
|||
&response, NULL)) < 0)
|
||||
goto send_error;
|
||||
|
||||
/* parse the keymgmt */
|
||||
i = 0;
|
||||
walk = sink->contexts;
|
||||
while (gst_rtsp_message_get_header (&response, GST_RTSP_HDR_KEYMGMT,
|
||||
&keymgmt, i++) == GST_RTSP_OK) {
|
||||
GstRTSPStreamContext *context = (GstRTSPStreamContext *) walk->data;
|
||||
walk = g_list_next (walk);
|
||||
if (!gst_rtsp_stream_handle_keymgmt (context->stream, keymgmt))
|
||||
goto keymgmt_error;
|
||||
}
|
||||
|
||||
/* send setup for all streams */
|
||||
if ((res = gst_rtsp_client_sink_setup_streams (sink, async)) < 0)
|
||||
goto setup_failed;
|
||||
|
@ -4414,6 +4427,11 @@ send_error:
|
|||
* taken care of it because we passed NULL for the response code */
|
||||
goto cleanup_error;
|
||||
}
|
||||
keymgmt_error:
|
||||
{
|
||||
GST_ELEMENT_ERROR (sink, STREAM, DECRYPT_NOKEY, (NULL),
|
||||
("Could not handle KeyMgmt"));
|
||||
}
|
||||
setup_failed:
|
||||
{
|
||||
GST_ERROR_OBJECT (sink, "setup failed");
|
||||
|
|
Loading…
Reference in a new issue