- parse_PAT: Add bounds check for payload_length >= 8 before accessing
header fields (fixes#2053)
- parse_PMT: Add ES_info_length validation and 2-byte minimum check
before reading descriptor_tag and desc_len in PRIVATE_USER_MPEG2
and teletext parsing loops (fixes#2054)
- processmp4: Add NULL check for file parameter before passing to
mprint (fixes#2055)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The test_mkvlang_sets_mkv_language test was comparing against
Language::Eng, but the mkvlang field type was changed to MkvLangFilter
when BCP 47 language tag support was added in PR #2038.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add libavdevice, libswresample, and libavfilter dependencies for
the hardsubx variant on both Ubuntu 24.04 and Debian 13 workflows.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CCExtractor is linked against libcurl-gnutls which requires this
runtime dependency on Ubuntu 24.04.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
apt install automatically resolves and installs dependencies,
unlike dpkg -i which fails if dependencies are missing.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use ubuntu-24.04 runner instead of ubuntu-22.04
- Update dependencies to match Ubuntu 24.04 library versions
(libtesseract5, libleptonica6, libavcodec60, etc.)
- Update GPAC cache key for new Ubuntu version
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update CMakeLists.txt version from 0.89 to 0.96 to match lib_ccx.h
- Extract version from lib_ccx.h instead of CMakeLists.txt for accuracy
- Add missing runtime dependencies: libtesseract, libleptonica
- Add FFmpeg dependencies for hardsubx variant
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add GitHub Actions workflow to build Debian packages (.deb) for Linux.
Features:
- Builds GPAC from source (abi-16.4 tag) since libgpac-dev is not
available in newer Debian/Ubuntu releases
- Creates two variants: basic (with OCR) and hardsubx (with FFmpeg)
- Bundles GPAC library with the package using patchelf for rpath
- Includes proper Debian package structure with control, postinst, postrm
- Runs on releases, manual trigger, or workflow file changes
- Uploads packages as artifacts and attaches to releases
This provides an unofficial .deb package for users who prefer that
format over AppImage or snap.
Relates to #1610
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Build workflows were not triggering on CMakeLists.txt changes.
Added **CMakeLists.txt and **.cmake patterns to path filters for:
- build_linux.yml
- build_mac.yml
- build_windows.yml
- build_docker.yml
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Two fixes for static library linking:
1. Preserve CMAKE_C_FLAGS in lib_ccx/CMakeLists.txt instead of
overwriting them. This allows passing include paths via
-DCMAKE_C_FLAGS which is needed for some build configurations.
2. Add target_link_options with --undefined flags for C functions
called from Rust (decode_vbi, do_cb, store_hdcc). With static
libraries, the linker processes them in order and only pulls
symbols that are currently unresolved. Since ccx is processed
before ccx_rust, these symbols weren't being pulled in.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace poorly-named tests (options_1 through options_51, broken_1, etc.)
with 201 descriptively-named tests organized by category:
- Input/output format tests
- Encoding tests
- Stream/program selection tests
- CEA-708 service tests
- Codec selection tests
- Timing option tests
- Debug flag tests
- Teletext option tests
- XMLTV option tests
- Credits option tests
- Buffering option tests
- And more
Each test name now clearly indicates what CLI option is being tested
and what behavior is expected, e.g.:
- test_input_ts_sets_transport_stream_mode
- test_608_enables_decoder_608_debug
- test_service_enables_708_with_single_service
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The --mkvlang option previously only supported single ISO 639-2 codes
due to using a Language enum with a fixed list of variants. Extended
codes (like "fre-ca") and multiple codes (like "eng,chi") would panic.
This change introduces MkvLangFilter, a proper type for language
filtering that:
- Validates language codes per BCP 47 specification
- Supports ISO 639-2 (3-letter codes like "eng")
- Supports BCP 47 tags (like "en-US", "zh-Hans-CN")
- Supports comma-separated multiple codes
- Provides clean error messages for invalid input
- Includes comprehensive unit tests
The C code continues to receive the raw string for strstr() matching,
maintaining backward compatibility.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The Rust CLI parser was showing "CCExtractor 1.0" instead of the
actual version (0.96.5). This was a placeholder value from when
the parser was first ported to Rust in August 2024 that was never
updated.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Root cause: When FTS timestamps were invalid due to PTS discontinuities,
the code fell back to DVB page timeout (65 seconds) as subtitle duration.
This caused impossible 65-second subtitle durations in split output.
Fix: Added DVB_MAX_SUBTITLE_DURATION_MS constant (10s) and simplified the
duration capping logic to always enforce reasonable subtitle durations.
Tested with: multiprogram_spain.ts, BBC1.ts, BBC2.ts - all outputs now
have properly capped durations with no timestamps exceeding 10 seconds.
When using -out=report mode, the encoder context (enc_ctx) is NULL
because no output file needs to be created. The Rust FFI function
ccxr_process_avc was dereferencing this NULL pointer, causing a
segmentation fault.
Add NULL pointer checks at the FFI boundary to skip AVC processing
when enc_ctx is NULL. This is safe because report mode only needs
stream analysis, not caption extraction.
Fixes#2023
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>