Skip to content

Commit

Permalink
rtprecv: warnings for UDP thread attach
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 committed Nov 2, 2023
1 parent 75fe91c commit 81433b5
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/rtprecv.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,18 @@ static int rtprecv_thread(void *arg)
tmr_start(&rx->tmr, 10, rtprecv_check_stop, rx);

err = udp_thread_attach(rtp_sock(rx->rtp));
if (err)
if (err) {
warning("rtp_receiver: could not attach to RTP socket (%m)\n",
err);
return err;
}

err = udp_thread_attach(rtcp_sock(rx->rtp));
if (err)
if (err) {
warning("rtp_receiver: could not attach to RTCP socket (%m)\n",
err);
return err;
}

err = re_main(NULL);

Expand Down Expand Up @@ -239,7 +245,7 @@ static int handle_rtp(struct rtp_receiver *rx, const struct rtp_header *hdr,

size_t ext_len = hdr->x.len*sizeof(uint32_t);
if (mb->pos < ext_len) {
warning("stream: corrupt rtp packet,"
warning("rtp_receiver: corrupt rtp packet,"
" not enough space for rtpext of %zu bytes\n",
ext_len);
return 0;
Expand All @@ -252,8 +258,8 @@ static int handle_rtp(struct rtp_receiver *rx, const struct rtp_header *hdr,

err = rtpext_decode(&extv[i], mb);
if (err) {
warning("stream: rtpext_decode failed (%m)\n",
err);
warning("rtp_receiver: rtpext_decode failed "
"(%m)\n", err);
return 0;
}
}
Expand Down

0 comments on commit 81433b5

Please sign in to comment.