- the channel entry should be saved after unlink (not before)
- the service or channel entry should be notified about changes
to keep the channel / service grids in sync
This is an attempt to fix the nonoptimal memory allocations. The old
code tries to allocate new chunks based on maximum packet value, but
the streams contain mostly short chunks. Also, in some cases, we know
the fixed sbuf size, so use it.
There is high probability (because of the "nature" of TS streams) that
next PID will match previous one. This patch tries to do simple "caching"
of last PID to speedup PID lookups.
The streaming pad filter is handled faster way now.
Also, sbuf allocations routines are optimized (better sb_size prediction and
allocation routine is called only on demand - not all time).
Fixes the following error with musl libc:
src/trap.c: In function 'traphandler':
src/trap.c:178:3: error: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Werror=format=]
snprintf(tmpbuf, sizeof(tmpbuf), "Register dump [%d]: ", NGREG);
^
There are no standard that says that __WORDSIZE should be defined or
in what include file. So in case its not defined we fallback to a
POSIX compliant way to determine wordsize.
This fixes build with 64 bit musl libc.
See https://tvheadend.org/issues/1983
Use the gcc specific __GNUC__ and __GNUC__ minor to determine gcc version
rather than using the GNU libc specific __GNUC_PREREQ.
This fixes the following compile error with musl libc:
src/descrambler/capmt.c:79:18: error: missing binary operator before token "("
#if __GNUC_PREREQ(4, 3)
^
Rather than check for specific glibc version on PLATFORM_LINUX, check
the existance of qsort_r.
This fixes the following compile error with musl libc:
CC src/main.o
In file included from src/main.c:39:0:
src/tvheadend.h:608:20: error: missing binary operator before token "("
#if !__GLIBC_PREREQ(2,8)
^