Commit Graph

3228 Commits

Author SHA1 Message Date
Carlos Fernandez
e17617fa53 Fix publish workflows: wait for release build to finish
The Chocolatey and WinGet publish workflows triggered on
release: [released], which fires simultaneously with the release
build. Since MSIs take ~45 minutes to build, the publish workflows
failed with 404 errors.

Switch both to workflow_run trigger so they wait for the "Upload
releases" workflow to complete before attempting to publish.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 17:07:59 -08:00
Carlos Fernandez Sanz
350799f9ad Update CHANGES.TXT for 0.96.6 release 2026-02-19 16:41:42 -08:00
Carlos Fernandez
eb7580498e Update CHANGES.TXT for 0.96.6 release
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:07:58 -08:00
Carlos Fernandez Sanz
f10ba93a27 Fix OCR memory leak: Tesseract leaked every DVB subtitle frame 2026-02-19 16:02:45 -08:00
Carlos Fernandez Sanz
0b6ddafeb8 Add notes that sample-platform depends on artifact names 2026-02-19 14:30:43 -08:00
Carlos Fernandez
a10106e2dc Add notes that sample-platform depends on artifact names
The CCExtractor/sample-platform test runner does exact string matching
on artifact names to find builds for testing. If these names are changed
without updating Artifact_names in sample-platform, CI tests silently
stop running.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 14:13:09 -08:00
Carlos Fernandez Sanz
6de9d8f608 Fix dangling pointers in copy_decoder_context 2026-02-19 13:39:39 -08:00
Carlos Fernandez
a2e1357a9d Fix OCR memory leak: Tesseract instance leaked every DVB subtitle frame
The lazy OCR initialization in write_dvb_sub() ran on the prev decoder
context, which is destroyed and recreated every frame. Each frame
therefore allocated a new Tesseract instance (~15-30 MB for language
models) that was never freed — plain free() on the DVBSubContext struct
does not call delete_ocr() on the embedded OCR pointer.

Move the lazy init to dvbsub_handle_display_segment() on the main
(non-prev) context, before it is memcpy'd into prev. This way:

- Tesseract is initialized exactly once (on first subtitle frame)
- All prev copies inherit the same OCR pointer via memcpy
- The single instance is properly freed in dvbsub_close_decoder()

For a 2-hour film with dense subtitles this reduces peak memory from
~28 GB to ~50 MB.

Fixes #2114

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:29:23 -08:00
Carlos Fernandez
622a096bcd Fix dangling pointers in copy_decoder_context
After memcpy, the copy shares all pointers with the original context.
The function NULLs out pointers it will deep-copy, but missed two:

- dtvcc_rust: Rust-allocated opaque pointer freed via ccxr_dtvcc_free()
  in dinit_cc_decode(). The copy must not hold this pointer since
  free_decoder_context() doesn't know about Rust allocations, and having
  two contexts point to the same Rust object causes use-after-free.

- prev: linked-list pointer to the previous decoder context. The copy
  should not inherit this link as it creates a corrupted list where
  multiple contexts share the same predecessor.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 12:33:10 -08:00
Carlos Fernandez Sanz
910e952c9f Add 32-bit (x86) Windows build support 2026-02-19 12:11:26 -08:00
Carlos Fernandez
df3b48890d Fix vcruntime DLL copy: use batch env var instead of MSBuild property
$(VCToolsRedistDir) resolves to empty in MSBuild's PostBuildEvent
context, so the xcopy commands silently fail with "File not found".

Switch to %VCToolsRedistDir% (batch environment variable syntax) which
is expanded by cmd.exe at runtime, where the variable is set by the
MSVC developer environment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:31:26 -08:00
Carlos Fernandez
571d311d86 Fix vcruntime DLLs: source from MSVC redist for correct architecture
The committed DLLs in windows/dll/ are x86-64 only, causing the Win32
build to ship 64-bit vcruntime140.dll alongside a 32-bit exe. This made
ccextractor silently fail on 32-bit Windows (reported in #2116).

Source vcruntime DLLs from $(VCToolsRedistDir) instead, which provides
the correct architecture (x86 or x64) matching the build target.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:34:37 -08:00
Carlos Fernandez
d3a12f0d9a Fix outdir: use trailing slash for x64, empty string for Win32
upload-artifact rejects '.' in paths. Use "x64/" and "" instead so
paths resolve to ./windows/x64/Release-Full and ./windows/Release-Full.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 15:49:33 -08:00
Carlos Fernandez
2b6012a19b Fix output directory paths for Win32 builds
MSBuild places Win32 output in windows/Release-Full/ (no platform
prefix), while x64 goes to windows/x64/Release-Full/. Use matrix
outdir variable to reference the correct output location.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 15:43:19 -08:00
Carlos Fernandez
23f5980d96 Fix GPAC path for x86 builds on 64-bit CI hosts
On 64-bit Windows, choco install gpac --forcex86 installs to
C:\Program Files (x86)\GPAC, not C:\Program Files\GPAC.

- Add configurable GpacDir MSBuild property (defaults to C:\Program Files\GPAC)
- Replace all hardcoded GPAC paths with $(GpacDir)
- Pass correct GpacDir from CI matrix for x86 builds

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 14:25:23 -08:00
Carlos Fernandez
1aa9762f19 Add 32-bit (x86) Windows build support
Re-introduce Win32 platform configurations to support 32-bit Windows,
which was dropped in 2023. This enables CCExtractor to run on 32-bit
Windows 10 systems.

Changes:
- Add Win32 (x86) platform to VS solution and project configs
- Make vcpkg triplet conditional (x86-windows-static for Win32)
- Update rust.bat to support i686-pc-windows-msvc via RUST_TARGET env var
- Add preprocessor conditional in installer.wxs for ProgramFilesFolder
- Convert CI build workflow to matrix strategy (x64 + x86)
- Update release workflow to produce both x64 and x86 installers

Closes #2116

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 09:35:11 -08:00
Carlos Fernandez Sanz
0626bb5929 Merge pull request #1994 from THE-Amrit-mahto-05/fix/demuxer-memory-leak
Free filebuffer to prevent 16MB memory leak in ccxr_demuxer_close
2026-02-16 00:53:49 -08:00
Carlos Fernandez Sanz
ba873ed45a Merge pull request #2078 from THE-Amrit-mahto-05/fix-ffi-ownership
Fix FFI allocator mismatch by properly handling Rust/C ownership
2026-02-15 20:28:53 -08:00
Carlos Fernandez
2f18aee7c2 Merge pull request #2020 - Add machine-readable JSON output for -out=report
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 14:02:44 -08:00
Carlos Fernandez
7bd3be1cd1 Merge master into feat/json-report, resolve CHANGES.TXT conflict
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 14:02:37 -08:00
Carlos Fernandez Sanz
0a4916f871 Merge pull request #2104 from AhmedAlian7/feat/transcript-dictionary-support
feat(transcript): Implement dictionary-based capitalization and censorship
2026-02-15 10:45:49 -08:00
Carlos Fernandez
45afa8a429 Merge origin/master into pr-2110 (resolve CHANGES.TXT conflict) 2026-02-15 08:56:20 -08:00
Carlos Fernandez Sanz
1ea2672e09 Merge pull request #2111 from ishaan-arora-1/fix/matroska-fd-leak-and-open-check
[FIX] Fix file descriptor leak and missing open() check in save_sub_track()
2026-02-15 08:53:47 -08:00
Carlos Fernandez Sanz
896e499d47 Merge pull request #2065 from Apprentice2907/docs/timestamp-map-docs
Document existing --timestamp-map option for WebVTT output
2026-02-15 07:55:59 -08:00
ishaan-arora-1
1afd909e8a fix(matroska): add missing open() check and close() in save_sub_track
save_sub_track() was missing two things:

1. No check on the return value of open(). If open() failed,
   desc would be -1, and the subsequent write_wrapped() calls
   would trigger a fatal error with a confusing message.

2. The file descriptor was never closed at the end of the function,
   leaking it on every call. The neighboring save_vobsub_track()
   already handles both correctly — this brings save_sub_track()
   in line with it.
2026-02-14 05:42:55 +05:30
ishaan-arora-1
9710e8163c fix(matroska): use correct strlen for end timestamp in subtitle output
In save_sub_track(), the length argument for writing timestamp_end
was incorrectly using strlen(timestamp_start) instead of
strlen(timestamp_end). This affected WebVTT, SRT, and ASS/SSA
output paths for Matroska subtitle extraction.
2026-02-14 05:35:41 +05:30
Ahmed Alian
2ac017f8fe feat(transcript): Implement dictionary-based capitalization and censorship 2026-02-09 20:03:10 +02:00
Chandragupt Singh
eafc3904c5 Merge branch 'master' into feat/json-report 2026-02-08 23:29:24 +05:30
Carlos Fernandez Sanz
dd2931153e Merge pull request #2077 from pranavshar223/fix/rust-clippy-pedantic
Fix/rust clippy pedantic
2026-02-07 13:37:15 -08:00
Carlos Fernandez Sanz
10288243b9 Merge pull request #2100 from x15sr71/fix/dvb-eit-bcd-start-time
[FIX]: Properly decode DVB EIT start time BCD field in XMLTV output
2026-02-07 13:25:03 -08:00
Carlos Fernandez Sanz
9762223105 Merge pull request #2079 from Atul-Chahar/fix/empty-webvtt-hls-compatibility-1743
Fix empty WebVTT files for HLS compatibility (Issue #1743)
2026-02-07 11:35:12 -08:00
Pranav Sharma
cad4d3d62d fix(rust): resolve clippy casts and enforce consistency in track_lister.rs 2026-02-07 19:32:05 +00:00
Carlos Fernandez Sanz
a30b8d7a83 Merge pull request #2092 from AhmedAlian7/fix-output-malloc
Replace static buffer with dynamic allocation in writercwtdata()
2026-02-07 11:30:35 -08:00
Chandragupt Singh
f920c16a53 docs: add changelog entry 2026-02-08 00:59:18 +05:30
THE-Amrit-mahto-05
5c05173c75 Fix Vec::from_raw_parts UB in string_to_c_chars (#2094)
Co-authored-by: Amrit kumar Mahto <amrit.mahto@adypu.edu.in>
2026-02-07 10:46:56 -08:00
Nicolas Dato
2582f628dd Fix sigsegv (#2090)
* Fix SIGSEGV when using --multiprogram

* Update CHANGES.TXT
2026-02-07 10:24:51 -08:00
dependabot[bot]
99f7d1955a chore(deps): bump time from 0.3.44 to 0.3.47 in /src/rust (#2097)
Bumps [time](https://github.com/time-rs/time) from 0.3.44 to 0.3.47.
- [Release notes](https://github.com/time-rs/time/releases)
- [Changelog](https://github.com/time-rs/time/blob/main/CHANGELOG.md)
- [Commits](https://github.com/time-rs/time/compare/v0.3.44...v0.3.47)

---
updated-dependencies:
- dependency-name: time
  dependency-version: 0.3.47
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-07 10:07:52 -08:00
dependabot[bot]
78e94f85c2 chore(deps): bump time from 0.3.41 to 0.3.47 in /src/rust/lib_ccxr (#2096)
Bumps [time](https://github.com/time-rs/time) from 0.3.41 to 0.3.47.
- [Release notes](https://github.com/time-rs/time/releases)
- [Changelog](https://github.com/time-rs/time/blob/main/CHANGELOG.md)
- [Commits](https://github.com/time-rs/time/compare/v0.3.41...v0.3.47)

---
updated-dependencies:
- dependency-name: time
  dependency-version: 0.3.47
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-07 10:07:50 -08:00
Chandragupt Singh
36f13922d2 fix: DVB EIT start time decoding using proper BCD parsing and normalization 2026-02-07 18:35:05 +05:30
Ahmed Alian
3a547fdeab Replace static buffer with dynamic allocation in writercwtdata() 2026-02-04 17:38:07 +02:00
Chandragupt Singh
7b891b99fc style(rust): format code with rustfmt 2026-02-04 01:29:16 +05:30
Chandragupt Singh
f82c231c1c fix(report): address program count and caption summary issues in JSON output 2026-02-04 00:29:25 +05:30
Chandragupt Singh
556392a9fe docs(changelog): mention JSON output support for -out=report 2026-02-04 00:28:03 +05:30
Chandragupt Singh
161878867d feat(report): add machine-readable JSON output for -out=report 2026-02-04 00:26:30 +05:30
Amrit kumar Mahto
08a52fd5a5 checks 2026-02-02 19:45:53 +05:30
THE-Amrit-mahto-05
bb68206f68 Update ffi_alloc.rs 2026-02-02 19:22:35 +05:30
THE-Amrit-mahto-05
858b8450ae Update ffi_alloc.rs 2026-02-02 19:18:47 +05:30
Prince
7cd7504e72 Fix unclosed code block in README 2026-02-02 14:19:03 +05:30
Amrit kumar Mahto
925907b75f fixed cargo clippy -- -D warnings 2026-02-02 04:48:02 +05:30
Amrit kumar Mahto
bbf84b62fe new changes 2026-02-02 04:40:49 +05:30