From d81c692bbb31a8b8f6dd7f8e0606928501e0bb95 Mon Sep 17 00:00:00 2001 From: "carlos@ccextractor.org" Date: Tue, 8 Jun 2021 15:00:21 +0000 Subject: [PATCH] Fix frame number calculation in SCC. Closes #1340 --- docs/CHANGES.TXT | 1 + src/lib_ccx/ccx_encoders_scc.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/CHANGES.TXT b/docs/CHANGES.TXT index 3dcc51a38..3b5f23829 100644 --- a/docs/CHANGES.TXT +++ b/docs/CHANGES.TXT @@ -31,6 +31,7 @@ - Fix: Segmentation fault with unsupported and multitrack file reports - Fix: Write subtitle header to multitrack outputs - Fix: Write multitrack files to the output file directory +- Fix: Correct frame number calculation in SCC (#1340) 0.88 (2019-05-21) ----------------- diff --git a/src/lib_ccx/ccx_encoders_scc.c b/src/lib_ccx/ccx_encoders_scc.c index 1bf2cde55..478bc012e 100644 --- a/src/lib_ccx/ccx_encoders_scc.c +++ b/src/lib_ccx/ccx_encoders_scc.c @@ -529,7 +529,7 @@ void add_timestamp(const struct encoder_ctx *context, LLONG time, const bool dis millis_to_time(time, &hour, &minute, &second, &milli); // SMPTE format - float frame = milli / 29.97; + float frame = milli * 29.97 / 1000; fdprintf(context->out->fh, "%02u:%02u:%02u:%02.f\t", hour, minute, second, frame); }