Skip to content

Commit

Permalink
rxtx/sdp: direct play url again print
Browse files Browse the repository at this point in the history
Since the rtpmap line is now generated also for static packet types,
the condition must have been updated to check the packet type rather
than the presence of rtpmap line.
  • Loading branch information
MartinPulec committed Aug 14, 2024
1 parent 4964139 commit 92ab653
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/utils/sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,18 +490,19 @@ static void
print_std_rtp_urls(struct sdp *sdp, bool ipv6) {
const char *const bind_addr = ipv6 ? "[::]" : "0.0.0.0";
int port = 0;
if (sdp->audio_index >= 0 &&
sdp->stream[sdp->audio_index].rtpmap[0] == '\0') {
if (sscanf(sdp_state->stream[sdp->audio_index].media_info, "%*[^ ] %d",
&port) == 1) {
int pt = 0;
if (sdp->audio_index >= 0) {
if (sscanf(sdp_state->stream[sdp->audio_index].media_info,
"%*[^ ] %d RTP/AVP %d", &port, &pt) == 2 &&
pt < PT_DynRTP_Type96) {
MSG(NOTICE, "audio can be played directly with rtp://%s:%d\n",
bind_addr, port);
}
}
if (sdp->video_index >= 0 &&
sdp->stream[sdp->video_index].rtpmap[0] == '\0') {
if (sscanf(sdp_state->stream[sdp->video_index].media_info, "%*[^ ] %d",
&port) == 1) {
if (sdp->video_index >= 0) {
if (sscanf(sdp_state->stream[sdp->video_index].media_info,
"%*[^ ] %d RTP/AVP %d", &port, &pt) == 2 &&
pt < PT_DynRTP_Type96) {
MSG(NOTICE, "video can be played directly with rtp://%s:%d\n",
bind_addr, port);
}
Expand Down

0 comments on commit 92ab653

Please sign in to comment.