mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
[PR #2007] [MERGED] fix: Correct progress time display for multi-program TS files #2808
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/2007
Author: @cfsmp3
Created: 1/10/2026
Status: ✅ Merged
Merged: 1/11/2026
Merged by: @cfsmp3
Base:
master← Head:fix/multi-program-ts-progress-time📝 Commits (1)
1c781c2fix: Correct progress time display for multi-program TS files📊 Changes
3 files changed (+42 additions, -1 deletions)
View changed files
📝
src/lib_ccx/file_functions.c(+1 -0)📝
src/lib_ccx/general_loop.c(+40 -1)📝
src/lib_ccx/lib_ccx.h(+1 -0)📄 Description
Summary
Problem
Multi-program TS files can have different PCR (Program Clock Reference) bases for each program. For example:
When processing such files, the progress time would jump between values based on which program's data was being processed:
This was confusing for a 6-second file!
Solution
Track the minimum timestamp offset seen across all programs and use that as the baseline:
min_global_timestamp_offsetfield to track minimum (global_timestamp - min_global_timestamp)current_offset - min_offsetas the timeTest Results
Multi-program DVB teletext sample (dvbt.ts, 6 seconds):
1% | 265:45,2% | 00:00,3% | 263:11... (jumping wildly)1% | 00:00,2% | 00:00...87% | 00:05,100% | 00:00(stable 0-5 second range)Single-program DVB subtitle sample:
0% | 00:00...100% | 00:34(no change, still works correctly)Test plan
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.