mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
[PR #1685] [CLOSED] [FIX] Initialize data structures for the rust CEA-708 decoder and correct Dtvcc-issue1499 #2401
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/CCExtractor/ccextractor/pull/1685
Author: @ujjwalr27
Created: 4/8/2025
Status: ❌ Closed
Base:
master← Head:issue1499-v2📝 Commits (3)
cdf8fd9issue1499617023dc2c43e1b3Merge branch 'CCExtractor:master' into issue1499📊 Changes
5 files changed (+292 additions, -4 deletions)
View changed files
📝
src/lib_ccx/ccx_decoders_common.c(+14 -0)📝
src/lib_ccx/ccx_decoders_common.h(+6 -0)📝
src/lib_ccx/ccx_decoders_structs.h(+1 -0)📝
src/lib_ccx/mp4.c(+41 -0)📝
src/rust/src/lib.rs(+230 -4)📄 Description
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
Summary of Changes Made
1. In
src/rust/src/lib.rs:lib_cc_decodestruct with adtvcc_rustfield to store the RustDtvccinstance.ccxr_dtvcc_init()function to initialize theDtvccstruct only once.ccxr_dtvcc_free()function to free theDtvccstruct.ccxr_process_cc_data()to use the storedDtvccinstance instead of creating a new one each time.2. In
src/lib_ccx/ccx_decoders_structs.h:dtvcc_rustfield to the existinglib_cc_decodestruct definition.3. In
src/lib_ccx/ccx_decoders_common.h:externdeclarations forccxr_dtvcc_initandccxr_dtvcc_freefunctions.4. In
src/lib_ccx/ccx_decoders_common.c:ccxr_dtvcc_init()afterdtvcc_initis called.ccxr_dtvcc_free()beforedtvcc_freeis called.dtvcc_rusttoNULLin theinit_cc_decodefunction.NULLinitialization fordtvcc_rustin thecopy_decoder_contextfunction.5. In
src/lib_ccx/mp4.c:MEDIA_TYPEdefines.externdeclarations for the Rust functions were already in place.process_clcpfunction to use the Rust implementation of Dtvcc:dtvcc_rustisNULLand initializes it if needed.cc_blockfor the Rust implementation.ccxr_process_cc_data()with the block.This implementation ensures that the
Dtvccstruct is initialized only once at the start of the program and then reused for all subsequent function calls. This fixes the issue where data was being reset each timeccxr_process_cc_data()was called. The changes also integrate this approach into the MP4 code path.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.