From 7e1edcf1a4eb71fd699a5fef0f810d1e3ef3c278 Mon Sep 17 00:00:00 2001 From: Kristofer Bjorkstrom Date: Mon, 30 Sep 2019 15:13:15 +0200 Subject: [PATCH] rtsp-client: RTP Info when completed_sender Change condition that should be fulfilled regarding RTPInfo. Replace !gst_rtsp_media_is_receive_only with gst_rtsp_media_has_completed_sender. It is more correct to actually look for a sender pipeline that is complete. Only then a RTPInfo should exist. gst_rtsp_media_is_receive_only gives different answears depending on state of server. If Describe is called wth URL+options for backchannel SDP will give only audio and only backchannel a=sendonly If Describe is called on URL+options that gives both audio and video direction from server to client, pipelines are created. Thus receive_only will return false, even though Setup only would setup backchannel. RTP-Info is only for outgoing streams. Thus one should look if outgoing streams are complete. --- gst/rtsp-server/rtsp-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c index c7e1620..0b7b556 100644 --- a/gst/rtsp-server/rtsp-client.c +++ b/gst/rtsp-server/rtsp-client.c @@ -2006,7 +2006,7 @@ handle_play_request (GstRTSPClient * client, GstRTSPContext * ctx) goto invalid_mode; /* grab RTPInfo from the media now */ - if (!gst_rtsp_media_is_receive_only (media) && + if (gst_rtsp_media_has_completed_sender (media) && !(rtpinfo = gst_rtsp_session_media_get_rtpinfo (sessmedia))) goto rtp_info_error; -- 2.7.4