Skip to content

Commit

Permalink
sdp: in media_decode() reset rdir if port is zero
Browse files Browse the repository at this point in the history
Consider the case e.g. in Session Progress SDP when the port number is zero!
This, means that the media should be deactivated and no attribute lines will
follow in the SDP. In this case the rdir should be set to SDP_INACTIVE.
  • Loading branch information
cspiel1 authored and sreimers committed Apr 26, 2021
1 parent f821ffb commit a5f30cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sdp/msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ static int media_decode(struct sdp_media **mp, struct sdp_session *sess,

m->rdir = sess->rdir;

if (!pl_u32(&port))
m->rdir = SDP_INACTIVE;

*mp = m;

return 0;
Expand Down

0 comments on commit a5f30cd

Please sign in to comment.