mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-04-25 23:50:01 +00:00
[PR #1841] [MERGED] fix: Fix variable shadowing and teletext context refresh issues #2599
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/1841
Author: @cfsmp3
Created: 12/18/2025
Status: ✅ Merged
Merged: 12/18/2025
Merged by: @cfsmp3
Base:
master← Head:fix/general-loop-ret-shadowing📝 Commits (1)
442ce10fix: Fix variable shadowing and teletext context refresh issues📊 Changes
2 files changed (+25 additions, -8 deletions)
View changed files
📝
src/lib_ccx/general_loop.c(+18 -8)📝
src/lib_ccx/lib_ccx.c(+7 -0)📄 Description
Summary
Fixes regression tests failing with exit code 10 (no captions found) on Sample Platform test 6904:
Root Cause Analysis
Two bugs were identified:
1. Variable Shadowing in general_loop()
In
general_loop(), the line:declared a new local variable that shadowed the outer
retvariable (initialized to 0). The outerretdetermines the exit code via:Since the outer
retwas never updated, CCExtractor always reported "No captions found".2. Missing private_data Refresh After PAT Changes
In
update_decoder_list_cinfo(), when returning an existing decoder context in non-multiprogram mode,dec_ctx->private_datawas not being refreshed from the newcap_info.After PAT changes:
dinit_cap()frees teletext context and NULLsdec_ctx->private_datacap_infocreated with newcodec_private_dataupdate_decoder_list_cinfo()returned existing decoder without updatingprivate_dataChanges
intdeclaration to update outerretvariableret = 1when captions detected via counters (for CEA-708)dec_ctx->private_datafromcinfo->codec_private_datawhen returning existing decoderTest plan
Note on CEA-708 Tests
Tests 137, 141, 142, etc. with
--service 1were also failing before the memory fixes merge. These samples may not have content in service 1. This fix addresses the variable shadowing issue; the underlying CEA-708 service detection may need separate investigation.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.