Skip to content

Commit

Permalink
change: session level connection setup attr
Browse files Browse the repository at this point in the history
  • Loading branch information
ireader committed Oct 14, 2023
1 parent 9c022e6 commit abf8052
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions librtsp/source/rtsp-media.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ int rtsp_media_sdp(const char* s, int len, struct rtsp_media_t* medias, int coun
int formats[16];
const char* control;
const char* start, *stop;
const char* iceufrag, *icepwd;
const char* iceufrag, *icepwd, *setup;
const char* username, *session, *version;
const char* network, *addrtype, *address, *source;
struct rtsp_media_t* m;
Expand Down Expand Up @@ -319,6 +319,7 @@ int rtsp_media_sdp(const char* s, int len, struct rtsp_media_t* medias, int coun
// session ice-ufrag/ice-pwd
iceufrag = sdp_attribute_find(sdp, "ice-ufrag");
icepwd = sdp_attribute_find(sdp, "ice-pwd");
setup = sdp_attribute_find(sdp, "setup");

for (i = 0; i < sdp_media_count(sdp) && i < count; i++)
{
Expand Down Expand Up @@ -365,7 +366,7 @@ int rtsp_media_sdp(const char* s, int len, struct rtsp_media_t* medias, int coun

// TODO: plan-B streams
m->mode = sdp_media_mode(sdp, i);
m->setup = SDP_A_SETUP_NONE;
m->setup = setup ? sdp_option_setup_from(setup) : SDP_A_SETUP_NONE;

// update media encoding
sdp_media_attribute_list(sdp, i, NULL, rtsp_media_onattr, m);
Expand Down

0 comments on commit abf8052

Please sign in to comment.