Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
829fcca
Enable debug_info symbols for tvheadend, ffmpeg and videodrivers
th0ma7 Sep 21, 2025
9356423
tvheadend: Update requirements for gracenote2epg[full]>=1.6.0
th0ma7 Sep 21, 2025
8280d5e
tvheadend: Update to bed53d31 git has from September 18th 2025
th0ma7 Sep 21, 2025
37c61e9
intel-graphics-compiler: Allow handling GCC_DEBUG_INFO
th0ma7 Sep 23, 2025
01ce974
tvheadend: Update to version 4.3 git hash 5fd59491 of Sept 22nd
th0ma7 Sep 30, 2025
5e87918
tvheadend: Add crash fix from https://github.com/tvheadend/tvheadend/…
th0ma7 Sep 30, 2025
3ee7250
tvheadend: Re-enable debug build
th0ma7 Sep 30, 2025
e3eca90
intel-graphic-compiler: Revert disabling assertions as now default
th0ma7 Sep 30, 2025
51d3788
synocli-videodriver: Not enough space on GH-action for Debug mode
th0ma7 Sep 30, 2025
069cf78
libhdhomerun: Update from version 20250506 to 20250815
th0ma7 Oct 7, 2025
2e44b9e
tvheadend: Update to git hash b6d58031 from Oct 5th 2025
th0ma7 Oct 7, 2025
42938af
tvheadend: Fix comcerto2k build as numpy requires gcc >= 8.5
th0ma7 Oct 8, 2025
67d548f
ffmpeg7: Workaround for compiler bug for hi3535 in dedug mode
th0ma7 Oct 8, 2025
f6ccff8
qoriq: Adjust debug compile flags to workaround architecture limits
th0ma7 Oct 8, 2025
fd825a8
tvheadend: Update to git hash d4dff154 from Oct 7th 2025
th0ma7 Oct 8, 2025
136bdf1
cross-env.mk: Adapt debug flags for older binutils
th0ma7 Oct 10, 2025
385d44b
ffmpeg7: Do not enable lto in Debug mode
th0ma7 Oct 10, 2025
b886a37
ffmpeg7: Add pending fix upstream affecting tvheadend
th0ma7 Oct 12, 2025
3f3a965
tvheadend: Update to version 4.3 git hash 0b23983f from Nov. 14th
th0ma7 Nov 19, 2025
0e65daf
ffmpeg7: Disable debug_info symbols
th0ma7 Nov 19, 2025
57f9ca9
ffmpeg7: Disable debug_info symbols and update changelog
th0ma7 Nov 19, 2025
2d154b0
ffmpeg7: Disable lto for evansport
th0ma7 Nov 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions cross/ffmpeg7/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ LICENSE = GPLv2
# requires c11 support
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(OLD_PPC_ARCHS)

include ../../mk/spksrc.common.mk

CONFIGURE_ARGS = --target-os=linux --cross-prefix=$(TC_PATH)$(TC_PREFIX) --prefix=$(INSTALL_PREFIX)
CONFIGURE_ARGS += --pkg-config=/usr/bin/pkg-config
CONFIGURE_ARGS += --ranlib=$(RANLIB)
Expand All @@ -21,26 +23,31 @@ CONFIGURE_ARGS += --enable-gpl --enable-version3
CONFIGURE_ARGS += --disable-static
CONFIGURE_ARGS += --disable-doc
ifeq ($(strip $(GCC_DEBUG_INFO)),1)
CONFIGURE_ARGS += --enable-debug=3 --disable-stripping --disable-optimizations --assert-level=2 --enable-ftrapv
ifeq ($(findstring $(ARCH), $(ARMv7L_ARCHS)),$(ARCH))
# Workaround for gcc-4.8.3 internal compilier bug in debug mode
CONFIGURE_ARGS += --enable-debug=3 --disable-stripping --assert-level=2
CONFIGURE_ARGS += --extra-cflags=-O1
else
CONFIGURE_ARGS += --enable-debug=3 --disable-stripping --assert-level=2 --enable-ftrapv --disable-optimizations
endif
else
CONFIGURE_ARGS += --extra-cflags=-O3
CONFIGURE_ARGS += --disable-debug
ifeq ($(findstring $(ARCH), $(i686_ARCHS)),)
CONFIGURE_ARGS += --enable-lto
endif
endif

# Must match $(SPK_REV) from spk/ffmpeg7/Makefile
CONFIGURE_ARGS += --extra-version=$(shell sed -n 's/^SPK_REV = \(.*\)/\1/p' $(WORK_DIR)/../../../spk/ffmpeg7/Makefile)

# Enable Synology specific -hls_seek_time option and other optimizations
CONFIGURE_ARGS += --extra-cflags=-DSYNO_VIDEOSTATION

# Compiler workaround to enable DTS-HD MA stream decoding
CONFIGURE_ARGS += --extra-cflags=-fno-if-conversion
# Synology default optimization
CONFIGURE_ARGS += --extra-cflags=-O3
# Remove some of the noise while compiling
CONFIGURE_ARGS += --extra-cflags=-Wno-deprecated-declarations

include ../../mk/spksrc.common.mk

# ARCH specific
OPTIONAL_DEPENDS = cross/openh264
OPTIONAL_DEPENDS += cross/libaom
Expand Down Expand Up @@ -210,7 +217,6 @@ ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS) $(ARMv7L_ARCHS)),$(ARCH))
CONFIGURE_ARGS += --arch=arm
CONFIGURE_ARGS += --enable-neon
CONFIGURE_ARGS += --enable-thumb
CONFIGURE_ARGS += --enable-lto
CONFIGURE_ARGS += --disable-armv5te
CONFIGURE_ARGS += --disable-armv6
CONFIGURE_ARGS += --disable-armv6t2
Expand All @@ -224,14 +230,12 @@ ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH))
CONFIGURE_ARGS += --arch=arm64
CONFIGURE_ARGS += --enable-neon
CONFIGURE_ARGS += --enable-thumb
CONFIGURE_ARGS += --enable-lto
endif

ifeq ($(findstring $(ARCH),qoriq),$(ARCH))
CONFIGURE_ARGS += --arch=ppc
CONFIGURE_ARGS += --cpu=e500v2
CONFIGURE_ARGS += --extra-libs=-latomic
CONFIGURE_ARGS += --enable-lto
endif

ifeq ($(findstring $(ARCH),evansport),$(ARCH))
Expand All @@ -249,7 +253,6 @@ DEPENDS += cross/intel-media-driver cross/intel-mediasdk
DEPENDS += cross/intel-libvpl cross/intel-libvpl-tools
endif
CONFIGURE_ARGS += --arch=x86_64
CONFIGURE_ARGS += --enable-lto
CONFIGURE_ARGS += --enable-libdrm
CONFIGURE_ARGS += --enable-libmfx
CONFIGURE_ARGS += --enable-vaapi
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
If hw_base_encode_send_frame() is called with frame == NULL before any
input frames are submitted, ctx->pic_end is NULL and dereferencing it
causes a crash. This can occur in hardware encoding pipelines that flush
before receiving any input frames.

Fix by checking ctx->pic_end before accessing its pts field.

Link: https://github.com/tvheadend/tvheadend/issues/1833
Signed-off-by: James Hutchinson <[email protected]>

Source: https://patchwork.ffmpeg.org/project/ffmpeg/patch/[email protected]/

--- libavcodec/vaapi_encode.c-orig 2025-08-05 00:22:34.000000000 +0000
+++ libavcodec/vaapi_encode.c 2025-10-12 12:10:57.687449669 +0000
@@ -1382,7 +1382,7 @@ static int vaapi_encode_send_frame(AVCod

// Fix timestamps if we hit end-of-stream before the initial decode
// delay has elapsed.
- if (ctx->input_order < ctx->decode_delay)
+ if (ctx->input_order <= ctx->decode_delay && ctx->pic_end)
ctx->dts_pts_diff = ctx->pic_end->pts - ctx->first_pts;
}

2 changes: 1 addition & 1 deletion cross/libhdhomerun/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PKG_NAME = libhdhomerun
PKG_VERS = 20250506
PKG_VERS = 20250815
PKG_EXT = tgz
PKG_DIST_NAME = $(PKG_NAME)_$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://download.silicondust.com/hdhomerun
Expand Down
6 changes: 3 additions & 3 deletions cross/libhdhomerun/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
libhdhomerun_20250506.tgz SHA1 5de17a094030e6fcdab80bbcb2777596895fb79e
libhdhomerun_20250506.tgz SHA256 879b1bc476c9b93e77ee280a84fc1157e7cc47d43ed9c8398d88a8ac5f35c034
libhdhomerun_20250506.tgz MD5 0ad4ab9827cff41ef6c59f637265f200
libhdhomerun_20250815.tgz SHA1 5de17a094030e6fcdab80bbcb2777596895fb79e
libhdhomerun_20250815.tgz SHA256 879b1bc476c9b93e77ee280a84fc1157e7cc47d43ed9c8398d88a8ac5f35c034
libhdhomerun_20250815.tgz MD5 0ad4ab9827cff41ef6c59f637265f200
4 changes: 2 additions & 2 deletions cross/tvheadend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ PKG_NAME = tvheadend
PKG_VERS = 4.3
PKG_EXT = tar.gz
# no official release since v4.2.8 (Jan 12, 2019)
# git hash from August 21st 2025
PKG_GIT_HASH = d69021326922bc2029f25858460ff4f5e245f89c
# git hash from Nov 14th 2025
PKG_GIT_HASH = 0b23983f5dafff006ee83908915193c49deacca5
PKG_DIST_NAME = $(PKG_GIT_HASH).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/tvheadend/tvheadend/archive
PKG_DIST_FILE = $(PKG_NAME)-git$(PKG_GIT_HASH).$(PKG_EXT)
Expand Down
6 changes: 3 additions & 3 deletions cross/tvheadend/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tvheadend-gitd69021326922bc2029f25858460ff4f5e245f89c.tar.gz SHA1 bc2c2162d8513f8073e42b6c1e34216d99f5746f
tvheadend-gitd69021326922bc2029f25858460ff4f5e245f89c.tar.gz SHA256 998625df8f0e2315e758018f7ce04e1f90b3945259e1c3a8a8c34ff8a97f2516
tvheadend-gitd69021326922bc2029f25858460ff4f5e245f89c.tar.gz MD5 416175fac77b091971b2de5413edf42c
tvheadend-git0b23983f5dafff006ee83908915193c49deacca5.tar.gz SHA1 4a9661b2288d79e4f47fbfedfaf8a9462000b8c2
tvheadend-git0b23983f5dafff006ee83908915193c49deacca5.tar.gz SHA256 8ad851b39afaa1bab121c00a1fcaff641e3640d2c4743a1ca7800d2f403fcf52
tvheadend-git0b23983f5dafff006ee83908915193c49deacca5.tar.gz MD5 2211ae9ef6e0bd4e7542d29457f4a3e2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- ./src/transcoding/transcode/context.c-orig 2025-09-29 23:02:55.751104426 +0000
+++ ./src/transcoding/transcode/context.c 2025-09-29 23:04:03.323094983 +0000
@@ -414,6 +414,11 @@ tvh_context_encode(TVHContext *self, AVF
int ret = 0;

if (!avcodec_is_open(self->oavctx)) {
+ // Check if we have a valid codec before attempting to open
+ if (!self->oavctx->codec) {
+ tvh_context_log(self, LOG_ERR, "cannot open encoder: no codec available");
+ return -1;
+ }
ret = tvh_context_open(self, OPEN_ENCODER);
}
if (!ret && !(ret = tvh_context_push_frame(self, avframe))) {
15 changes: 14 additions & 1 deletion mk/spksrc.cross-env.mk
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,22 @@ ENV += TC_KERNEL=$(TC_KERNEL)
# -g3 includes macro definitions in debug info
# -O0 disables optimizations for predictable debugging
# -gz compresses debug sections to reduce file size (60-80% smaller)
#
# PowerPC e500v2 (qoriq): Use -O1 to avoid stack frame offset limitations
# (e500v2 has 248-byte max offset for certain load/store instructions)
#
# GCC 4.8.3 (hi3535/armv7l) with old binutils cannot handle compressed
# debug sections from -g3. Use -g (level 2) instead which generates
# less debug info and avoids compression
ifeq ($(strip $(GCC_DEBUG_INFO)),1)
ifeq ($(strip $(GCC_DEBUG_FLAGS)),)
GCC_DEBUG_FLAGS = -ggdb3 -g3 -O0
ifeq ($(findstring $(ARCH), $(PPC_ARCHS)),$(ARCH))
GCC_DEBUG_FLAGS = -ggdb3 -g3 -O1 -fno-omit-frame-pointer
else ifeq ($(findstring $(ARCH), $(ARMv7L_ARCHS)),$(ARCH))
GCC_DEBUG_FLAGS = -ggdb3 -g3 -O1 -fno-omit-frame-pointer
else
GCC_DEBUG_FLAGS = -ggdb3 -g -O0
endif

# Check compression support and add to flags
GCC_SUPPORTS_GZ := $(shell echo | $(WORK_DIR)/../../../toolchain/syno-$(ARCH)-$(TCVERSION)/work/$(TC_TARGET)/bin/$(TC_PREFIX)gcc -gz -E - 2>/dev/null 1>&2 && echo yes)
Expand Down
10 changes: 1 addition & 9 deletions mk/spksrc.cross-meson-crossfile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,9 @@ endif
ifeq ($(GCC_DEBUG_INFO),1)
@echo "debug = 'true'" ; \
echo "b_ndebug = 'true'" ; \
echo "optimization = '0'" ; \
echo "optimization = '$(strip $(patsubst -O%,%,$(filter -O%,$(GCC_DEBUG_FLAGS))))'" ; \
echo
endif
# @echo "install_rpath = [" ; \
# echo $(LDFLAGS) $(ADDITIONAL_LDFLAGS) | tr ' ' '\n' | grep '^-Wl,--rpath,' | sed -e "s/^-Wl,--rpath,//" -e "s/^/\t'/" -e "s/$$/',/" ; \
# echo -ne "\t]\n" ; \
# echo
# @echo "runtime_rpath = [" ; \
# echo $(LDFLAGS) $(ADDITIONAL_LDFLAGS) | tr ' ' '\n' | grep '^-Wl,--rpath,' | sed -e "s/^-Wl,--rpath,//" -e "s/^/\t'/" -e "s/$$/',/" ; \
# echo -ne "\t]\n" ; \
# echo
@echo "c_args = ["
ifneq ($(strip $(MESON_BUILTIN_C_ARGS)),)
@echo -ne "\t'$(MESON_BUILTIN_C_ARGS)',\n"
Expand Down
2 changes: 1 addition & 1 deletion spk/ffmpeg7/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SPK_NAME = ffmpeg7
SPK_VERS = 7.0.3
SPK_REV = 4
SPK_ICON = src/ffmpeg.png
CHANGELOG = "1. Update to version 7.0.3"
CHANGELOG = "1. Update to version 7.0.3<br/>2. Apply crash fix by checking ctx->pic_end before accessing its pts field."

DEPENDS = cross/ffmpeg7

Expand Down
60 changes: 36 additions & 24 deletions spk/tvheadend/Makefile
Original file line number Diff line number Diff line change
@@ -1,43 +1,23 @@
SPK_NAME = tvheadend
SPK_SHORT_VERS = 4.3
SPK_GIT_HASH = d6902132
SPK_GIT_DATE = 20250821
SPK_GIT_HASH = 0b23983f
SPK_GIT_DATE = 20251114
SPK_VERS = $(SPK_SHORT_VERS).$(SPK_GIT_DATE)
TVH_VERS = $(SPK_SHORT_VERS)~$(SPK_GIT_HASH)
SPK_REV = 44
SPK_REV = 45
SPK_ICON = src/tvheadend.png
DSM_UI_DIR = app

# Export version to the build where version
# script gets patched accordingly by:
# 000-fix-version.patch from cross/tvheadend
export TVH_VERS

FFMPEG_PACKAGE = ffmpeg7
PYTHON_PACKAGE = python312
SPK_DEPENDS = 'python312:$(FFMPEG_PACKAGE)'

# PPC archs except qoriq are not supported
# https://tvheadend.org/issues/5060
UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS)
# ffmpeg7 requires c11 support
UNSUPPORTED_ARCHS += $(ARMv5_ARCHS)

# Force building pure-python wheels to include gracenote2epg
WHEELS_PURE_PYTHON_PACKAGING_ENABLE = 1
WHEELS += src/requirements-pure.txt

DEPENDS = cross/tvheadend
DEPENDS += cross/dtv-scan-tables
DEPENDS += cross/docker-tvheadend
DEPENDS += cross/zap2epg

MAINTAINER = th0ma7
DESCRIPTION = Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, ISDB-T, IPTV, SAT IP and HDHomeRun as input sources. Tvheadend offers HTTP, HTSP and SAT IP streaming.
DESCRIPTION_FRE = Tvheadend est un serveur de streaming et enregistreur TV pour Linux, FreeBSD et Android prenant en charge DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, ISDB-T, IPTV, SAT IP et HDHomeRun comme sources d\'entrée. Tvheadend offre le streaming HTTP, HTSP et SAT IP.
DISPLAY_NAME = Tvheadend
STARTABLE = yes
CHANGELOG = "1. Update to latest git version d6902132 as of August 21st 2025 \(Includes season and episode number to filename formatting, Add scene markers to recordings, Add age ratings on XMLTV\)<br/>2. Update zap2epg to version 4.1<br/> 3. Include new gracenote2epg grabber v1.5.1"
CHANGELOG = "1. Update to latest git version 0b23983f as of November 14th 2025<br/>2. TVH crash with NULL codec before encoder open<br/>3. Update gracenote2epg grabber v1.6.0<br/>4. Update libhdhomerun v20250815"
HOMEPAGE = https://tvheadend.org/
LICENSE = GPL v3

Expand All @@ -54,4 +34,36 @@ SERVICE_PORT_TITLE = Tvheadend (HTTP)
# Admin link
ADMIN_PORT = ${SERVICE_PORT}

# PPC archs except qoriq are not supported
# https://tvheadend.org/issues/5060
UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS)
# ffmpeg7 requires c11 support
UNSUPPORTED_ARCHS += $(ARMv5_ARCHS)

DEPENDS = cross/tvheadend
DEPENDS += cross/dtv-scan-tables
DEPENDS += cross/docker-tvheadend
DEPENDS += cross/zap2epg

OPTIONAL_DEPENDS += python/numpy
OPTIONAL_DEPENDS += python/pandas

WHEELS += src/requirements-pure.txt

include ../../mk/spksrc.common.mk

# Optional gracenote2epg dependencies
ifeq ($(call version_ge, $(TC_GCC), 8.5),1)
# [numpy]
DEPENDS += python/numpy

# [pandas]
DEPENDS += python/pandas
endif

# Export version to the build where version
# script gets patched accordingly by:
# 000-fix-version.patch from cross/tvheadend
export TVH_VERS

include ../../mk/spksrc.python.mk
12 changes: 10 additions & 2 deletions spk/tvheadend/src/requirements-pure.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
#certifi ==> python312
charset-normalizer==3.4.2
gracenote2epg==1.5.1
gracenote2epg==1.6.0
idna==3.10
langdetect==1.0.9
polib==1.2.0
requests==2.32.4
urllib3==2.5.0

# Additional wheels for gracenote2epg[full] >= 1.6.0
#numpy==2.2.6 # python/numpy
#pandas==2.3.2 # python/pandas
pgeocode==0.5.0
python-dateutil==2.9.0.post0
pytz==2025.2
tzdata==2025.2