mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-04-20 21:20:28 +00:00
[PR #1841] fix: Fix variable shadowing and teletext context refresh issues #2604
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?
Original Pull Request: https://github.com/CCExtractor/ccextractor/pull/1841
State: closed
Merged: Yes
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