From 1515f5c1be01d8da35e7f5a261be5db61cf3041d Mon Sep 17 00:00:00 2001 From: dhanush varma Date: Sat, 8 Nov 2025 11:42:54 +0530 Subject: [PATCH 1/3] build: add tesseract library linking for hardsubx feature Fixes #1719 - build was failing with --enable-hardsubx due to missing tesseract library linking. Added pkg_check_modules for tesseract and leptonica in the HARDSUBX section of CMakeLists.txt. Tested with: cmake -DWITH_HARDSUBX=ON -DWITH_OCR=ON -DWITH_FFMPEG=ON --- src/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b7bcfa035..1896b3492 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -230,6 +230,14 @@ if (PKG_CONFIG_FOUND AND WITH_HARDSUBX) set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${SWSCALE_INCLUDE_DIRS}) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_HARDSUBX") + pkg_check_modules (TESSERACT REQUIRED tesseract) + pkg_check_modules (LEPTONICA REQUIRED lept) + + set (EXTRA_LIBS ${EXTRA_LIBS} ${TESSERACT_LIBRARIES}) + set (EXTRA_LIBS ${EXTRA_LIBS} ${LEPTONICA_LIBRARIES}) + + set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${TESSERACT_INCLUDE_DIRS}) + set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${LEPTONICA_INCLUDE_DIRS}) endif (PKG_CONFIG_FOUND AND WITH_HARDSUBX) add_executable (ccextractor ${SOURCEFILE} ${FREETYPE_SOURCE} ${UTF8PROC_SOURCE}) From 74c55907a2949e5e01d711ecd74912ab6d6fb29f Mon Sep 17 00:00:00 2001 From: dhanush varma Date: Sun, 9 Nov 2025 12:25:24 +0530 Subject: [PATCH 2/3] docs: add Scoop package manager installation note --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 8bede60b6..2b94719d8 100644 --- a/README.md +++ b/README.md @@ -71,3 +71,10 @@ For more information visit the CCExtractor website: [https://www.ccextractor.org ## License GNU General Public License version 2.0 (GPL-2.0) + +### Windows Package Managers + +CCExtractor is also available via [Scoop](https://scoop.sh): +``` +scoop install ccextractor +``` From c3c4d3b713222d863dab465f0f6cc484b9af9b71 Mon Sep 17 00:00:00 2001 From: dhanush varma Date: Sun, 9 Nov 2025 22:00:15 +0530 Subject: [PATCH 3/3] Fix premature ending error in switch_to_next_file() Remove multiprogram check from is_decoder_processed_enough() that caused false 'premature ending' errors in multiprogram mode. The function should return CCX_TRUE when any decoder has processed enough data, regardless of multiprogram setting. Tested with the original failing file - resolves the issue without regression. --- README.md | 7 ------- src/lib_ccx/lib_ccx.c | 3 +-- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/README.md b/README.md index 2b94719d8..8bede60b6 100644 --- a/README.md +++ b/README.md @@ -71,10 +71,3 @@ For more information visit the CCExtractor website: [https://www.ccextractor.org ## License GNU General Public License version 2.0 (GPL-2.0) - -### Windows Package Managers - -CCExtractor is also available via [Scoop](https://scoop.sh): -``` -scoop install ccextractor -``` diff --git a/src/lib_ccx/lib_ccx.c b/src/lib_ccx/lib_ccx.c index 4b137952e..afe742db1 100644 --- a/src/lib_ccx/lib_ccx.c +++ b/src/lib_ccx/lib_ccx.c @@ -260,10 +260,9 @@ int is_decoder_processed_enough(struct lib_ccx_ctx *ctx) struct lib_cc_decode *dec_ctx; list_for_each_entry(dec_ctx, &ctx->dec_ctx_head, list, struct lib_cc_decode) { - if (dec_ctx->processed_enough == CCX_TRUE && ctx->multiprogram == CCX_FALSE) + if (dec_ctx->processed_enough == CCX_TRUE) return CCX_TRUE; } - return CCX_FALSE; } struct lib_cc_decode *update_decoder_list(struct lib_ccx_ctx *ctx)