ccextractor: 0.94-unstable-2025-05-20 -> 0.96.6

This commit is contained in:
Simon Bruder
2026-06-18 11:25:30 +02:00
parent 746b8efb34
commit dbc8e73a26
5 changed files with 18 additions and 122 deletions

View File

@@ -1,13 +0,0 @@
diff --git a/src/lib_ccx/hardsubx.c b/src/lib_ccx/hardsubx.c
index 20b4388..fa6b5fa 100644
--- a/src/lib_ccx/hardsubx.c
+++ b/src/lib_ccx/hardsubx.c
@@ -125,7 +125,7 @@ int hardsubx_process_data(struct lib_hardsubx_ctx *ctx, struct lib_ccx_ctx *ctx_
if (ctx->frame)
av_frame_free(&ctx->frame);
if (ctx->rgb_frame)
av_frame_free(&ctx->rgb_frame);
- avcodec_close(ctx->codec_ctx);
+ avcodec_free_context(&ctx->codec_ctx);
avformat_close_input(&ctx->format_ctx);
}

View File

@@ -31,24 +31,17 @@
stdenv.mkDerivation (finalAttrs: {
pname = "ccextractor";
version = "0.94-unstable-2025-05-20";
version = "0.96.6";
src = fetchFromGitHub {
owner = "CCExtractor";
repo = "ccextractor";
rev = "407d0f4e93611c5b0ceb14b7fc01d4a4c2e90433";
hash = "sha256-BfsQmCNB4HRafqJ3pC2ECiwhOgwKuIqiLjr2/bvHr7Q=";
rev = "v${finalAttrs.version}";
hash = "sha256-nvfQX+1pM16ll7ruXcB22fWn2zQvmpUzKhD3vznEcbI=";
};
patches = [
./remove-default-commit-hash.patch
./remove-vendored-libraries.patch
./fix-avcodec-close.patch
(fetchpatch {
name = "CVE-2026-2245.patch";
url = "https://github.com/CCExtractor/ccextractor/commit/fd7271bae238ccb3ae8a71304ea64f0886324925.patch";
hash = "sha256-wZiJob5v4SVa5YBmiHuNvgphSi4PhTTb3hg4vs1lhVg=";
})
]
++ finalAttrs.cargoDeps.vendorStaging.patches;
@@ -58,8 +51,7 @@ stdenv.mkDerivation (finalAttrs: {
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs) src cargoRoot;
patches = [ ./use-rsmpeg-0.15.patch ];
hash = "sha256-68Y8nzPHxhVIRHoPXOy9tc71177lCBuOf//z3cqyDGQ=";
hash = "sha256-0FPxU3rUoT3/Xy3mQjjQGmxkNjs++sQxjCJ1/UuRQlc=";
};
nativeBuildInputs = [
@@ -94,10 +86,6 @@ stdenv.mkDerivation (finalAttrs: {
# The tests are all part of one `cargo test` invocation, so lets
# get the output from it.
(lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" "--verbose")
# TODO: This (and the corresponding patch) should probably be
# removed for the next stable release.
(lib.cmakeFeature "GIT_COMMIT_HASH" finalAttrs.src.rev)
]
++ lib.optionals enableOcr [
(lib.cmakeBool "WITH_OCR" true)
@@ -140,7 +128,7 @@ stdenv.mkDerivation (finalAttrs: {
postPatch = lib.optionalString enableOcr ''
substituteInPlace src/lib_ccx/ocr.c \
--replace-fail 'getenv("TESSDATA_PREFIX")' '"${tesseract}/share"'
--replace-fail 'getenv("TESSDATA_PREFIX")' '"${tesseract}/share/"'
'';
meta = {

View File

@@ -1,14 +0,0 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d7fdda02e3...2738cab631 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -24,9 +24,6 @@
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
-ELSE(EXISTS "${BASE_PROJ_DIR}/.git")
- set(GIT_BRANCH "Unknown")
- set(GIT_COMMIT_HASH "Unknown")
ENDIF(EXISTS "${BASE_PROJ_DIR}/.git")
#Get the date

View File

@@ -1,13 +1,12 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2738cab631...5bb2b7d17a 100644
index 95e27199..a1695a3f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -48,93 +48,20 @@
@@ -49,74 +49,14 @@ endif()
include_directories(${PROJECT_SOURCE_DIR})
include_directories(${PROJECT_SOURCE_DIR}/lib_ccx)
include_directories(${PROJECT_SOURCE_DIR}/lib_ccx/zvbi)
-include_directories(${PROJECT_SOURCE_DIR}/thirdparty)
-include_directories(${PROJECT_SOURCE_DIR}/thirdparty/protobuf-c)
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/lib_hash)
-include_directories(${PROJECT_SOURCE_DIR}/thirdparty/libpng)
@@ -27,13 +26,11 @@ index 2738cab631...5bb2b7d17a 100644
-include_directories(${PROJECT_SOURCE_DIR}/thirdparty/freetype/include)
aux_source_directory(${PROJECT_SOURCE_DIR}/thirdparty/lib_hash/ SOURCEFILE)
-aux_source_directory(${PROJECT_SOURCE_DIR}/thirdparty/libpng/ SOURCEFILE)
-aux_source_directory(${PROJECT_SOURCE_DIR}/thirdparty/protobuf-c/ SOURCEFILE)
-aux_source_directory(${PROJECT_SOURCE_DIR}/thirdparty/zlib/ SOURCEFILE)
aux_source_directory(${PROJECT_SOURCE_DIR}/lib_ccx/zvbi/ SOURCEFILE)
-set(UTF8PROC_SOURCE ${PROJECT_SOURCE_DIR}/thirdparty/utf8proc/utf8proc.c)
+set(UTF8PROC_SOURCE)
-
-set(FREETYPE_SOURCE
- ${PROJECT_SOURCE_DIR}/thirdparty/freetype/autofit/autofit.c
- ${PROJECT_SOURCE_DIR}/thirdparty/freetype/base/ftbase.c
@@ -77,10 +74,13 @@ index 2738cab631...5bb2b7d17a 100644
- ${PROJECT_SOURCE_DIR}/thirdparty/freetype/type42/type42.c
- ${PROJECT_SOURCE_DIR}/thirdparty/freetype/winfonts/winfnt.c
- )
+set(UTF8PROC_SOURCE)
+
+set(FREETYPE_SOURCE)
#Windows specific libraries and linker flags
if(WIN32)
include_directories ("${PROJECT_SOURCE_DIR}/thirdparty/win_spec_incld/")
if(NOT MINGW)
@@ -125,17 +65,6 @@ if(WIN32)
include_directories ("${PROJECT_SOURCE_DIR}/thirdparty/win_iconv/")
aux_source_directory ("${PROJECT_SOURCE_DIR}/thirdparty/win_iconv/" SOURCEFILE)
set (EXTRA_LIBS ${EXTRA_LIBS} ws2_32 winmm Bcrypt)
@@ -98,21 +98,11 @@ index 2738cab631...5bb2b7d17a 100644
endif(WIN32)
if(MSVC)
@@ -212,9 +139,6 @@
pkg_check_modules (NANOMSG REQUIRED libnanomsg)
set (EXTRA_LIBS ${EXTRA_LIBS} ${NANOMSG_STATIC_LIBRARIES})
- include_directories ("${PROJECT_SOURCE_DIR}/thirdparty/protobuf-c/")
- aux_source_directory ("${PROJECT_SOURCE_DIR}/thirdparty/protobuf-c/" SOURCEFILE)
-
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_SHARING")
endif (PKG_CONFIG_FOUND AND WITH_SHARING)
diff --git a/src/lib_ccx/CMakeLists.txt b/src/lib_ccx/CMakeLists.txt
index 4f329bcaab...a334d20c4d 100644
index a891560b..154c1c15 100644
--- a/src/lib_ccx/CMakeLists.txt
+++ b/src/lib_ccx/CMakeLists.txt
@@ -13,9 +13,39 @@
@@ -13,9 +13,39 @@ endif(WIN32)
find_package(PkgConfig)
pkg_check_modules (GPAC REQUIRED gpac)
@@ -152,16 +142,16 @@ index 4f329bcaab...a334d20c4d 100644
if (WITH_FFMPEG)
find_package(PkgConfig)
@@ -94,7 +124,7 @@
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDISABLE_RUST")
endif (WITHOUT_RUST)
@@ -87,7 +117,7 @@ if (WITH_HARDSUBX)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_HARDSUBX")
endif (WITH_HARDSUBX)
-file (GLOB HeaderFiles *.h)
+file (GLOB_RECURSE HeaderFiles *.h)
file (WRITE ccx.pc "prefix=${CMAKE_INSTALL_PREFIX}\n"
"includedir=\${prefix}/include\n"
"libdir=\${prefix}/lib\n\n"
@@ -102,8 +132,8 @@
@@ -95,8 +125,8 @@ file (WRITE ccx.pc "prefix=${CMAKE_INSTALL_PREFIX}\n"
"Description: Closed Caption Extraction library\n"
"Version: 0.75\n"
"Cflags: -I\${includedir}/\n"
@@ -172,16 +162,3 @@ index 4f329bcaab...a334d20c4d 100644
)
install (TARGETS ccx DESTINATION lib)
diff --git a/src/lib_ccx/params.c b/src/lib_ccx/params.c
index eb1562e50c...984070a285 100644
--- a/src/lib_ccx/params.c
+++ b/src/lib_ccx/params.c
@@ -14,7 +14,7 @@
#include "../lib_hash/sha2.h"
#include <string.h>
#include <stdio.h>
-#include <utf8proc/utf8proc.h>
+#include <utf8proc.h>
#ifdef ENABLE_OCR
#include <tesseract/capi.h>

View File

@@ -1,42 +0,0 @@
diff --git a/src/rust/Cargo.lock b/src/rust/Cargo.lock
index 5c49573775..3e855aa637 100644
--- a/src/rust/Cargo.lock
+++ b/src/rust/Cargo.lock
@@ -665,11 +665,10 @@
[[package]]
name = "rsmpeg"
-version = "0.14.2+ffmpeg.6.1"
+version = "0.15.1+ffmpeg.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "927012cd6ae43519f519741f4a69602ce3a47cf84750784da124dffd03527cc0"
+checksum = "d3ffbead667d06e0c77c4363f83d49a3481cc3838bc9a61882aa07b01e3f63e1"
dependencies = [
- "libc",
"paste",
"rusty_ffmpeg",
"thiserror",
@@ -711,9 +710,9 @@
[[package]]
name = "rusty_ffmpeg"
-version = "0.13.3+ffmpeg.6.1"
+version = "0.14.1+ffmpeg.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "716adffa5f909c8533611b1dab9ab5666bece35687845865b75ed6a990fc239c"
+checksum = "40f4db8e3e23d4a3044d53a41aba5324eae70d3e7fe82375ce833521533bc315"
dependencies = [
"bindgen 0.69.4",
"camino",
diff --git a/src/rust/Cargo.toml b/src/rust/Cargo.toml
index 4c1e73dcf0..68502915dc 100644
--- a/src/rust/Cargo.toml
+++ b/src/rust/Cargo.toml
@@ -15,7 +15,7 @@
env_logger = "0.8.4"
palette = "0.6.1"
-rsmpeg = { version = "0.14.2", optional = true, features = [
+rsmpeg = { version = "0.15.1", optional = true, features = [
"link_system_ffmpeg",
] }
tesseract-sys = { version = "0.5.15", optional = true, default-features = false }