[PR #1930] [MERGED] fix: Properly handle ATSC CC in private MPEG-2 streams #2730

Open
opened 2026-01-29 17:23:38 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/1930
Author: @cfsmp3
Created: 12/29/2025
Status: Merged
Merged: 12/29/2025
Merged by: @cfsmp3

Base: masterHead: fix/private-mpeg2-cc-handling


📝 Commits (2)

  • 3365a71 fix: Properly handle ATSC CC in private MPEG-2 streams
  • 25162fe chore: Add build directories to .gitignore

📊 Changes

4 files changed (+11 additions, -24 deletions)

View changed files

📝 .gitignore (+2 -0)
📝 src/lib_ccx/avc_functions.c (+4 -5)
📝 src/lib_ccx/general_loop.c (+1 -5)
📝 src/lib_ccx/ts_functions.c (+4 -14)

📄 Description

Summary

  • Properly process ATSC CC data in private MPEG-2 streams (stream type 0x06)
  • Fix debug dumps that were flooding terminal output by using correct debug masks

Changes

1. ATSC CC in private MPEG-2 streams now works

Previously, CCX_PRIVATE_MPEG2_CC buffer type was created but never properly implemented. It would dump raw data and return placeholder bytes instead of actually processing the captions.

Fix: Both private MPEG-2 streams (0x06) and user-private streams (0x80-0x8F) with ATSC CC codec now return CCX_PES buffer type and use the same processing path.

2. Debug output no longer floods terminal

Several dump() calls were using CCX_DMT_GENERIC_NOTICES which is enabled by default, causing binary hex dumps to appear during normal operation.

Fix: Changed to appropriate debug-only masks:

  • avc_functions.c: SEI error dumps → CCX_DMT_VERBOSE
  • general_loop.c: Unrecognized header dumps → CCX_DMT_PARSE

Test plan

  • TS files with captions still extract correctly
  • TS files without captions process to completion without binary output
  • MOV/MP4 files still work
  • Exit code 10 (no captions) returned appropriately

🤖 Generated with Claude Code


🔄 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/1930 **Author:** [@cfsmp3](https://github.com/cfsmp3) **Created:** 12/29/2025 **Status:** ✅ Merged **Merged:** 12/29/2025 **Merged by:** [@cfsmp3](https://github.com/cfsmp3) **Base:** `master` ← **Head:** `fix/private-mpeg2-cc-handling` --- ### 📝 Commits (2) - [`3365a71`](https://github.com/CCExtractor/ccextractor/commit/3365a715a6e16a7db46a0e5b463e621237d7c40d) fix: Properly handle ATSC CC in private MPEG-2 streams - [`25162fe`](https://github.com/CCExtractor/ccextractor/commit/25162fe40a0d8e097cebe236a8b7231db86557dd) chore: Add build directories to .gitignore ### 📊 Changes **4 files changed** (+11 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+2 -0) 📝 `src/lib_ccx/avc_functions.c` (+4 -5) 📝 `src/lib_ccx/general_loop.c` (+1 -5) 📝 `src/lib_ccx/ts_functions.c` (+4 -14) </details> ### 📄 Description ## Summary - Properly process ATSC CC data in private MPEG-2 streams (stream type 0x06) - Fix debug dumps that were flooding terminal output by using correct debug masks ## Changes ### 1. ATSC CC in private MPEG-2 streams now works Previously, `CCX_PRIVATE_MPEG2_CC` buffer type was created but never properly implemented. It would dump raw data and return placeholder bytes instead of actually processing the captions. **Fix:** Both private MPEG-2 streams (0x06) and user-private streams (0x80-0x8F) with ATSC CC codec now return `CCX_PES` buffer type and use the same processing path. ### 2. Debug output no longer floods terminal Several `dump()` calls were using `CCX_DMT_GENERIC_NOTICES` which is enabled by default, causing binary hex dumps to appear during normal operation. **Fix:** Changed to appropriate debug-only masks: - `avc_functions.c`: SEI error dumps → `CCX_DMT_VERBOSE` - `general_loop.c`: Unrecognized header dumps → `CCX_DMT_PARSE` ## Test plan - [x] TS files with captions still extract correctly - [x] TS files without captions process to completion without binary output - [x] MOV/MP4 files still work - [x] Exit code 10 (no captions) returned appropriately 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <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:23:38 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2730