Use different function to get a port from a pool and return it, and
reserve a port in a pool permanently during startup.
Change-Id: I030dc2ebbe30c9b47252669717f235177f15219d
Protect selected_sfd with in_lock.
Protect RTCP sending with in_lock and out_lock as appropriate.
Has the odd side effect of RTCP reports expected in tests to be sent one
packet later than before.
Closes#1966
Probably fixes#1927
Change-Id: I225b43dff8e8fbb938d3be6aad50249997615d77
Add the ptime into the hash function so that cached player using
different ptimes use distinct entries.
Closes#1963
Change-Id: Ib118cd2ce14525d524a2d63c0506af8ae8ae929f
... from packetizer function instead of putting it into the AVPacket.
Remove AVPacket from callback function arguments.
Fix up PTS/duration adjustments where they were missing.
Closes#1963
Change-Id: Ib36b36bb6648b0579dd83155c7217317dda29cc3
Fixes:
../lib/loglib.h:54:17: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]
54 | __ilog(prio, "[%s] " fmt, log_level_names[system], ##__VA_ARGS__); \
| ^~~~~~
sdp.c:613:21: note: ‘err’ was declared here
613 | const char *err;
| ^~~
sdp.c:734:9: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]
734 | ilog(LOG_ERROR, "Failed to parse a=crypto attribute, ignoring: %s", err);
| ^
sdp.c:613:21: note: ‘err’ was declared here
613 | const char *err;
| ^
Change-Id: I18c3c1d6f2d6d5643a61ef864116e1f3d5e1db95
Fixes:
main.c: In function ‘options’:
main.c:1055:9: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
1055 | const static size_t max_buf_size =
| ^~~~~
Change-Id: I500785e712d94ff0969317edf3d7a256dc4e3182
Add `EXTRACT_NETWORK_ADDRESS_ATTR`
for proper error alias handling,
otherwise just quits with no attr type change.
Change-Id: Iacea9350503b68962a3c233df9126102b67d3b8b
If dummy definition with no tag, algo etc.
just ignore it, otherwise not excluded
and is dangling in outgoing SDP.
Also add according test.
Change-Id: Ib7c981ee66b1ce8cb363a9cc181231c68baa69cd
Using `l->next` as a test for whether only one element is left in the
list is not reliable. Use the actual list length instead.
Update one affected test.
Closes#1961
Change-Id: I5773715700220cd762e61090bac941ddd33afd9b
Allow restarting the DTX buffer upon reception of a packet iff shutdown
occurred due to the max-dtx time being exceeded.
Change-Id: I9cbb9e946e6f495526cbef8f468f4e0a5aff0096
SDP attributes have been moved to the call's memory arena in 5115fe000.
Make sure the redis restore code uses the same.
Remove some redundant null checks as well.
Closes#1959
Change-Id: I2f37869f5f2c95999d028c811c6a0eb10215f576
Multiple writers may operate on a single WS connection simultaneously.
Make sure they don't get in each other's way while constructing their
messages/responses by holding the lock from the beginning of the
response until the point when it's fully ready. This fixes a problem of
parts of multiple messages getting mixed up with each other.
Change-Id: If84224fc06b423cd65c12981a5b09ee99b121df2
Looks like partial writes are handled automatically internally, but add
a request for a "writeable" callback anyway so we know when we can write
more.
Closes#1943
Change-Id: I86a8e1924febc0524b90dc6559753e12e0de9dfb
this fixes an edge case where `DTMF-security=silence`, `block-media`
is enabled and the endpoint sends silence packets in between each RTP
event packet of a single DTMF hit. When that happens, the DTMF doesn't
get processed as `packet_sequencer_next_packet` returns NULL, and the
while loop is broken due to the ts_diff being 0
By checking if media is currently blocked and that the current packet
is a supplemental DTMF, we can force the packet to be processed so the
dropped packet is considered lost and we don't lose the DTMF event
Change-Id: I78bc8e273e872b3ab88f7a84e26a79fad1793476
A simple mechanism to track whether a given media endpoint has been
advertised to the public. If it hasn't, then any media received on it is
considered suspicious, and source addresses are ignored for learning
purposes.
Change-Id: I76a08e3f442f263dad192ff496a5d734a9349d26
The internally used VALID flag doesn't reflect the "valid" state from
the RFC, possibly leading to legitimate packets (DTLS etc) to be
ignored. Introduce a new flag to track which ICE pairs have been
authenticated through requests or responses.
Change-Id: I11b8e2bb6a7638ab9405304c6f45c29b20d3739c
If DTX audio has already been produced for a particular timestamp and a
late packet matching that timestamp is encountered, we should just
discard the packet instead of immediately doing a timestamp reset. This
prevents unwanted TS resets. Only do a timestamp reset if this happens
multiple times in a row, as we don't want to have to discard too much
audio.
Change-Id: I46c8c20b08787f7e45145bd88463bb6878f36f15