goto invalid_mode;
/* grab RTPInfo from the media now */
- rtpinfo = gst_rtsp_session_media_get_rtpinfo (sessmedia);
+ if (!(rtpinfo = gst_rtsp_session_media_get_rtpinfo (sessmedia)))
+ goto rtp_info_error;
/* construct the response now */
code = GST_RTSP_STS_OK;
gst_rtsp_status_as_text (code), ctx->request);
/* add the RTP-Info header */
- if (rtpinfo)
- gst_rtsp_message_take_header (ctx->response, GST_RTSP_HDR_RTP_INFO,
- rtpinfo);
+ gst_rtsp_message_take_header (ctx->response, GST_RTSP_HDR_RTP_INFO, rtpinfo);
if (seek_style)
gst_rtsp_message_add_header (ctx->response, GST_RTSP_HDR_SEEK_STYLE,
seek_style);
send_generic_response (client, code, ctx);
return FALSE;
}
+rtp_info_error:
+ {
+ GST_ERROR ("client %p: failed to add RTP-Info", client);
+ send_generic_response (client, GST_RTSP_STS_INTERNAL_SERVER_ERROR, ctx);
+ return FALSE;
+ }
}
static void