avfilter/af_whisper: fix srt file format

The SRT file format requires commas in the time string, not periods.

(cherry picked from commit 73d411c399df4abe2750b611fc8381979fcbafc6)
This commit is contained in:
Vittorio Palmisano 2025-08-29 11:32:20 +02:00 committed by Zhao Zhili
parent b784c3eb6d
commit adc819773b

View file

@ -246,7 +246,7 @@ static void run_transcription(AVFilterContext *ctx, AVFrame *frame, int samples)
if (!av_strcasecmp(wctx->format, "srt")) {
buf =
av_asprintf
("%d\n%02ld:%02ld:%02ld.%03ld --> %02ld:%02ld:%02ld.%03ld\n%s\n\n",
("%d\n%02ld:%02ld:%02ld,%03ld --> %02ld:%02ld:%02ld,%03ld\n%s\n\n",
wctx->index, start_t / 3600000,
(start_t / 60000) % 60, (start_t / 1000) % 60,
start_t % 1000, end_t / 3600000, (end_t / 60000) % 60,