[PR #1762] [CLOSED] Fix premature ending error in switch_to_next_file() #2487

Closed
opened 2026-01-29 17:22:25 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/1762
Author: @DhanushVarma-2
Created: 11/9/2025
Status: Closed

Base: masterHead: fix-switch-to-next-file-1701


📝 Commits (3)

  • 1515f5c build: add tesseract library linking for hardsubx feature
  • 74c5590 docs: add Scoop package manager installation note
  • c3c4d3b Fix premature ending error in switch_to_next_file()

📊 Changes

2 files changed (+9 additions, -2 deletions)

View changed files

📝 src/CMakeLists.txt (+8 -0)
📝 src/lib_ccx/lib_ccx.c (+1 -2)

📄 Description

Fixes #1701

Problem:
The is_decoder_processed_enough() function always returned 'CCX_FALSE' in multiprogram mode due to an unnecessary 'ctx->multiprogram == CCX_FALSE' check. This caused false "premature ending" errors in switch_to_next_file().

Solution:
Remove the multiprogram check from is_decoder_processed_enough(). The function should return CCX_TRUE when any decoder has processed enough data, regardless of multiprogram setting.

Testing:

  • Verified the fix resolves the issue with the original failing file
  • Confirmed no regressions in normal operation
  • Program now correctly handles files with no subtitles without false errors

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/CCExtractor/ccextractor/pull/1762 **Author:** [@DhanushVarma-2](https://github.com/DhanushVarma-2) **Created:** 11/9/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix-switch-to-next-file-1701` --- ### 📝 Commits (3) - [`1515f5c`](https://github.com/CCExtractor/ccextractor/commit/1515f5c1be01d8da35e7f5a261be5db61cf3041d) build: add tesseract library linking for hardsubx feature - [`74c5590`](https://github.com/CCExtractor/ccextractor/commit/74c55907a2949e5e01d711ecd74912ab6d6fb29f) docs: add Scoop package manager installation note - [`c3c4d3b`](https://github.com/CCExtractor/ccextractor/commit/c3c4d3b713222d863dab465f0f6cc484b9af9b71) Fix premature ending error in switch_to_next_file() ### 📊 Changes **2 files changed** (+9 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/CMakeLists.txt` (+8 -0) 📝 `src/lib_ccx/lib_ccx.c` (+1 -2) </details> ### 📄 Description Fixes #1701 Problem: The is_decoder_processed_enough() function always returned 'CCX_FALSE' in multiprogram mode due to an unnecessary 'ctx->multiprogram == CCX_FALSE' check. This caused false "premature ending" errors in `switch_to_next_file()`. Solution: Remove the multiprogram check from `is_decoder_processed_enough()`. The function should return `CCX_TRUE` when any decoder has processed enough data, regardless of multiprogram setting. Testing: - Verified the fix resolves the issue with the original failing file - Confirmed no regressions in normal operation - Program now correctly handles files with no subtitles without false errors --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 17:22:25 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2487