From: WyattBlue via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: WyattBlue <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] avfilter/af_whisper: Add newline for txt format (PR #21250)
Date: Sun, 21 Dec 2025 09:03:52 -0000
Message-ID: <176630783358.60.12050891311204140155@2cb04c0e5124> (raw)
PR #21250 opened by WyattBlue
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21250
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21250.patch
Like 'srt' and 'json, this adds one "\n" character for the 'txt' format. This makes the format a lot more useful because each line is not smushed together.
>From a38f4286d7857421d4bdf0e3ea47f5352eb24aeb Mon Sep 17 00:00:00 2001
From: WyattBlue <wyattblue@auto-editor.com>
Date: Sun, 21 Dec 2025 03:54:44 -0500
Subject: [PATCH] avfilter/af_whisper: Add newline for txt format
---
libavfilter/af_whisper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/af_whisper.c b/libavfilter/af_whisper.c
index 3c0eba42f0..ce00b88bb1 100644
--- a/libavfilter/af_whisper.c
+++ b/libavfilter/af_whisper.c
@@ -256,7 +256,7 @@ static void run_transcription(AVFilterContext *ctx, AVFrame *frame, int samples)
} else if (!av_strcasecmp(wctx->format, "json")) {
buf = av_asprintf("{\"start\":%" PRId64 ",\"end\":%" PRId64 ",\"text\":\"%s\"}\n", start_t, end_t, text_cleaned);
} else
- buf = av_strdup(text_cleaned);
+ buf = av_asprintf("%s\n", text_cleaned);
if (buf) {
avio_write(wctx->avio_context, buf, strlen(buf));
--
2.49.1
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
reply other threads:[~2025-12-21 9:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=176630783358.60.12050891311204140155@2cb04c0e5124 \
--to=ffmpeg-devel@ffmpeg.org \
--cc=code@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git