Browse Source

TT#14008 fix possible segfault when out of ports

closes #1243

Change-Id: Ib04c289ad78624139c0375423a7bc1ad402874e7
(cherry picked from commit 6cc1e99ee8)
mr9.2.1
Richard Fuchs 5 years ago
parent
commit
be43e2a11e
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      daemon/media_socket.c

+ 5
- 1
daemon/media_socket.c View File

@ -1535,7 +1535,9 @@ static void media_packet_rtcp_demux(struct packet_handler_ctx *phc)
} }
} }
phc->out_srtp = phc->sink; phc->out_srtp = phc->sink;
if (phc->rtcp && phc->sink && phc->sink->rtcp_sibling)
if (!phc->sink)
return;
if (phc->rtcp && phc->sink->rtcp_sibling)
phc->out_srtp = phc->sink->rtcp_sibling; // use RTCP SRTP context phc->out_srtp = phc->sink->rtcp_sibling; // use RTCP SRTP context
phc->mp.media_out = phc->sink->media; phc->mp.media_out = phc->sink->media;
@ -1546,6 +1548,8 @@ static void media_packet_rtp(struct packet_handler_ctx *phc)
{ {
phc->payload_type = -1; phc->payload_type = -1;
if (G_UNLIKELY(!phc->mp.media))
return;
if (G_UNLIKELY(!proto_is_rtp(phc->mp.media->protocol))) if (G_UNLIKELY(!proto_is_rtp(phc->mp.media->protocol)))
return; return;


Loading…
Cancel
Save