fix: address Copilot review comments on PR #2150

- Fix mapping comments: 4=23.976 (aka 23.98) in ccx_encoders_scc.c
- Update help text to document 23.976 and 29 as accepted aliases
- Add test_scc_framerate_23_976 unit test for the 23.976 alias
This commit is contained in:
Varadraj75
2026-02-28 18:04:24 +05:30
parent f7bdb86504
commit 1189433c06
3 changed files with 8 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ unsigned char odd_parity(const unsigned char byte)
*/
// Get frame rate value from scc_framerate setting
// 0=29.97 (default), 1=24, 2=25, 3=30, 4=23.98
// 0=29.97 (default), 1=24, 2=25, 3=30, 4=23.976 (aka 23.98)
static float get_scc_fps_internal(int scc_framerate)
{
switch (scc_framerate)
@@ -829,7 +829,7 @@ enum control_code get_font_code(enum font_bits font, enum ccx_decoder_608_color_
}
// Get frame rate value from scc_framerate setting
// 0=29.97 (default), 1=24, 2=25, 3=30, 4=23.98
// 0=29.97 (default), 1=24, 2=25, 3=30, 4=23.976 (aka 23.98)
static float get_scc_fps(int scc_framerate)
{
switch (scc_framerate)

View File

@@ -297,7 +297,7 @@ pub struct Args {
#[arg(long="90090", verbatim_doc_comment, help_heading=OPTIONS_AFFECTING_INPUT_FILES)]
pub mpeg90090: bool,
/// Set the frame rate for Scenarist Closed Captioning (SCC) input parsing and output encoding.
/// Valid values: 23.98, 29.97 (default), 24, 25, 30
/// Valid values: 23.98/23.976, 29.97 (default)/29, 24, 25, 30
/// Example: --scc-framerate 25
#[arg(long="scc-framerate", verbatim_doc_comment, value_name="fps", help_heading=OPTIONS_AFFECTING_INPUT_FILES)]
pub scc_framerate: Option<String>,

View File

@@ -2837,6 +2837,11 @@ pub mod tests {
assert_eq!(options.scc_framerate, 4);
}
#[test]
fn test_scc_framerate_23_976() {
let (options, _) = parse_args(&["--scc-framerate", "23.976"]);
assert_eq!(options.scc_framerate, 4);
}
#[test]
fn test_scc_framerate_24() {
let (options, _) = parse_args(&["--scc-framerate", "24"]);
assert_eq!(options.scc_framerate, 1);