mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-04-21 21:49:57 +00:00
[PR #1931] [MERGED] fix(dvb): Enable OCR for all DVB subtitle streams, not just first #2732
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/1931
Author: @cfsmp3
Created: 12/29/2025
Status: ✅ Merged
Merged: 12/29/2025
Merged by: @cfsmp3
Base:
master← Head:fix/dvb-ocr-multi-stream-issue-1067📝 Commits (3)
3365a71fix: Properly handle ATSC CC in private MPEG-2 streams25162fechore: Add build directories to .gitignorea71687efix(dvb): Enable OCR for all DVB subtitle streams, not just first📊 Changes
14 files changed (+17 additions, -39 deletions)
View changed files
📝
.gitignore(+2 -0)📝
src/lib_ccx/avc_functions.c(+4 -5)📝
src/lib_ccx/ccx_demuxer.c(+0 -1)📝
src/lib_ccx/ccx_demuxer.h(+0 -1)📝
src/lib_ccx/dvb_subtitle_decoder.c(+2 -3)📝
src/lib_ccx/dvb_subtitle_decoder.h(+1 -1)📝
src/lib_ccx/general_loop.c(+1 -5)📝
src/lib_ccx/matroska.c(+1 -1)📝
src/lib_ccx/ts_functions.c(+4 -14)📝
src/lib_ccx/ts_info.c(+1 -1)📝
src/lib_ccx/ts_tables.c(+1 -3)📝
src/rust/src/common.rs(+0 -1)📝
src/rust/src/ctorust.rs(+0 -1)📝
src/rust/src/demuxer/common_types.rs(+0 -2)📄 Description
Summary
initialized_ocrflag that incorrectly prevented OCR initialization for subsequent streamsRoot Cause
The
initialized_ocrflag was stored at the program level (pinfo->initialized_ocr), shared across all DVB subtitle streams within a program. When the first DVB stream was initialized, it set this flag to 1. Subsequent streams saw the flag was set and skipped OCR initialization, leaving them withocr_ctx = NULL.Test Plan
Tested with multi-language DVB sample containing Finnish (PID 0xCDF) and Dutch (PID 0xCE0) subtitle streams:
Before fix:
After fix:
Both streams now extract correctly:
Fixes #1067
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.