Patch to check success of the socket creation

While unlikely, the socket creation could fail,
returning an error rather than a file descriptor.
Log it, and continue.

Fixes coverity 746816
(cherry picked from commit db44509884e10110b81332f53d7c9e56af7b2f61)

Fixes #11586

Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
Initialize m_off member variable

Static analysis (scan-build and coverity) noted that
the m_off variable in the RTPDataPacket class is not
initialized for UDPPackets, which are used in
RTPPacketBuffer::PushDataPacket

Fixes coverity 746870
(cherry picked from commit 86410ede4625c881fde68ad34210711cf1f81983)

Fixes #11589

Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
Correct check for null pointer return

In 1e1e5500 code was added to call pa_channel_map_init_auto,
and check the result.  This patch corrects that check for
a null pointer.

Fixes coverity 700280
(cherry picked from commit 78ddf38354312cdeecccd6030becb78b86b797bf)

Fixes #11592

Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
Patch to address potential integer overflow

Static analysis (coverity) detected that some of the math
in the routine getLatency was performed in 32 bit arithmetic,
even though the result was 64 bits. This could result in an
(theoretical) integer overflow. Cast to 64 bits to fix the
defect.

Note that a quick check (perhaps wrong) showed that this
method was never called, so this is probably an irrelevant
identified defect.

Fixes coverity 700584
(cherry picked from commit 499584ef7e20f97c738427fffc2657a56f1617ab)

Fixes #11595

Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
Check the success of setsockopt

Static analysis (coverity) reported a defect for not checking
the return from setsockopt.  Put in the check, and log if the
setsockopt fails (unlikely).

Fixes coverity 746751 and 746752
(cherry picked from commit 8ec9a2d38c3ce94249382dfdc9d8a6ab66831356)

Fixes #11598

Signed-off-by: Stuart Morgan <smorgan@mythtv.org>