mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-04-05 21:51:23 +00:00
ci: add dual build artifacts to compare C vs Rust code paths (#2207)
* fix: flush pending EIT sections in EPG_free() before freeing buffers * ci: add dual build artifacts to compare C vs Rust code paths Add -min-rust flag to linux/build that passes -DDISABLE_RUST to gcc, causing switchable modules (DTVCC, demuxer, AVC, networking, hex utils) to use their C implementations instead of Rust. The Rust library still compiles since many modules are Rust-only. The Linux CI now produces two artifacts: - "CCExtractor Linux build" — min Rust (C paths where available) - "CCExtractor Linux build (with migrations)" — max Rust Both should produce identical output on the sample platform. If they diverge, it means a Rust port introduced a behavioral difference. The sample platform will need a corresponding update to recognize and test the new "with migrations" artifact. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Varadraj75 <agrawalvaradraj2007@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
578abcaf3b
commit
92389cff84
25
.github/workflows/build_linux.yml
vendored
25
.github/workflows/build_linux.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
||||
run: sudo apt update && sudo apt-get install libgpac-dev libtesseract-dev libavcodec-dev libavdevice-dev libx11-dev libxcb1-dev libxcb-shm0-dev
|
||||
- uses: actions/checkout@v6
|
||||
- name: build
|
||||
run: ./build -hardsubx
|
||||
run: ./build -hardsubx -min-rust
|
||||
working-directory: ./linux
|
||||
- name: Display version information
|
||||
run: ./ccextractor --version
|
||||
@@ -49,6 +49,29 @@ jobs:
|
||||
with:
|
||||
name: CCExtractor Linux build
|
||||
path: ./linux/artifacts
|
||||
build_shell_migrations:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: sudo apt update && sudo apt-get install libgpac-dev libtesseract-dev libavcodec-dev libavdevice-dev libx11-dev libxcb1-dev libxcb-shm0-dev
|
||||
- uses: actions/checkout@v6
|
||||
- name: build
|
||||
run: ./build -hardsubx
|
||||
working-directory: ./linux
|
||||
- name: Display version information
|
||||
run: ./ccextractor --version
|
||||
working-directory: ./linux
|
||||
- name: Prepare artifacts
|
||||
run: mkdir ./linux/artifacts
|
||||
- name: Copy release artifact
|
||||
run: cp ./linux/ccextractor ./linux/artifacts/
|
||||
# NOTE: The sample-platform test runner (CCExtractor/sample-platform)
|
||||
# matches artifact names exactly. Update Artifact_names in
|
||||
# mod_ci/controllers.py there if you rename this artifact.
|
||||
- uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: CCExtractor Linux build (with migrations)
|
||||
path: ./linux/artifacts
|
||||
build_autoconf:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@@ -24,6 +24,11 @@ while [[ $# -gt 0 ]]; do
|
||||
BLD_LINKER="$BLD_LINKER -lswscale -lavutil -pthread -lavformat -lavcodec -lavfilter -lxcb-shm -lxcb -lX11 -llzma -lswresample"
|
||||
shift
|
||||
;;
|
||||
-min-rust)
|
||||
MIN_RUST=true
|
||||
BLD_FLAGS="$BLD_FLAGS -DDISABLE_RUST"
|
||||
shift
|
||||
;;
|
||||
-system-libs)
|
||||
USE_SYSTEM_LIBS=true
|
||||
shift
|
||||
|
||||
@@ -1630,6 +1630,24 @@ void EPG_free(struct lib_ccx_ctx *ctx)
|
||||
{
|
||||
if (ctx->epg_inited)
|
||||
{
|
||||
// Flush any pending EIT sections not triggered by a subsequent
|
||||
// payload_start_indicator packet (e.g. last section in stream)
|
||||
for (int i = 0; i <= 0xfff; i++)
|
||||
{
|
||||
if (ctx->epg_buffers[i].buffer != NULL && ctx->epg_buffers[i].ccounter > 0)
|
||||
{
|
||||
if (ctx->epg_buffers[i].buffer_length > 0)
|
||||
{
|
||||
unsigned char pointer_field = (unsigned char)ctx->epg_buffers[i].buffer[0];
|
||||
if ((size_t)pointer_field + 1 < (size_t)ctx->epg_buffers[i].buffer_length)
|
||||
{
|
||||
EPG_parse_table(ctx, ctx->epg_buffers[i].buffer, ctx->epg_buffers[i].buffer_length);
|
||||
}
|
||||
}
|
||||
free(ctx->epg_buffers[i].buffer);
|
||||
ctx->epg_buffers[i].buffer = NULL;
|
||||
}
|
||||
}
|
||||
if (ccx_options.xmltv == 2 || ccx_options.xmltv == 3 || ccx_options.send_to_srv)
|
||||
{
|
||||
if (ccx_options.send_to_srv)
|
||||
|
||||
Reference in New Issue
Block a user