The handling of source::sr is MT-Unsafe when the library is used from
within 2 threads. Typically when running `uv -t testcard -d dummy` (with
-DDEBUG), check_database() is run from sender thread while process_rtcp_sr
from receiver thread leading to a crash on line 589 using the old
structure data that has been freed and overwritten by some new data.
The above mentioned crash doesn't usually occur since check_database()
is run only if DEBUG is defined. However, in theory it may happen that
both threads accidentaly run process_rtcp_sr() (alhough not observed). In
that case either double-free or a leak could occur if the runs of
process_rtcp_sr() is interleaved in a wrong way. Unfortunately, as the
RTP library is originally mt-unsafe, there can be plenty of similar
undiscovered problems.
(Note: to test the check_database() crash, running in GDB seems to
increase the likelihood that it crashes. This change on the other hand
seems to retuce that, but clearly doesn't eliminate that because the
content of the struct is read while it may be freed by the other thread.)