Skip to content

[BUG] CEA-708 SCC output uses hardcoded 29.97 for frame delay calculations #2172

@Atul-Chahar

Description

@Atul-Chahar

CCExtractor version: latest master (commit f377be9)

Necessary information

  • Is this a regression (i.e. did it work before)? NO — this has always been hardcoded
  • What platform did you use? Linux
  • What were the used arguments? ccextractor --out=scc (on a non-29.97fps stream)

Additional information

The dtvcc_write_scc() function in src/lib_ccx/ccx_decoders_708_output.c uses hardcoded 1000 / 29.97 for frame delay calculations in 6 places (lines 553, 557, 569, 574, 578, 582).

This is the same class of bug fixed for CEA-608 in #2145 / PR #2146, but in the CEA-708 (DTVCC) output path — which was missed.

Affected code

// Line 553
time_show.time_in_ms -= 1000 / 29.97;
// Line 557
time_show.time_in_ms += 1000 / 29.97;
// ... (4 more identical patterns on lines 569, 574, 578, 582)

Impact

When the stream framerate is not 29.97 (e.g., 25fps PAL, 23.976 film, 24fps), the CEA-708 SCC output has incorrect frame delay offsets, causing subtitle timing to drift.

Suggested fix

Replace 1000 / 29.971000 / current_fps on all 6 lines. The current_fps global is already accessible via the existing include chain (ccx_decoders_708_output.hccx_common_option.hccx_common_timing.h).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions