mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-04-19 04:22:49 +00:00
[PR #2024] [CLOSED] Fix: Prevent AVC segfault in report-only mode (-out=report)
#2826
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/2024
Author: @x15sr71
Created: 1/16/2026
Status: ❌ Closed
Base:
master← Head:fix/report-mode-avc-segfault📝 Commits (2)
6b393a9fix: prevent AVC segfault in report-only(-out=report) mode11df2afdocs(changelog): mention fix for AVC segfault in report-only mode📊 Changes
2 files changed (+7 additions, -0 deletions)
View changed files
📝
docs/CHANGES.TXT(+1 -0)📝
src/lib_ccx/avc_functions.c(+6 -0)📄 Description
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
Summary
This PR fixes a segmentation fault that occurs (as reported in issue #2023) when running CCExtractor in report-only mode (
-out=report) on files containing AVC (H.264) video streams with the Rust AVC decoder enabled.Problem
When running:
on transport streams containing AVC/H.264 video, CCExtractor crashes with a segmentation fault.
Solution
Add a defensive guard at the C → Rust FFI boundary in
process_avc()to skip AVC processing when the decoder context isn't fully initialized (such as in report-only mode).Guard Conditions
Skip calling the Rust AVC decoder if any of the following are true:
encoder_ctxis NULLencoder_ctx->timingis NULLlib_cc_decodeis NULLlib_cc_decode->avc_ctxis NULLIn these cases,
process_avc()simply returns without invoking the Rust decoder.Rationale
process_avc(); no changes to Rust internals🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.