1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/libaribcaption: change new lines to \n in ASS header

Fixes remaining \r\n is ASS header after 57c545090d.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Kacper Michajłow
2024-05-10 22:30:02 +02:00
committed by Marton Balint
parent 0105ff554b
commit 597186b153

View File

@ -522,14 +522,14 @@ static int set_ass_header(ARIBCaptionContext *ctx)
av_freep(&avctx->subtitle_header); av_freep(&avctx->subtitle_header);
avctx->subtitle_header = av_asprintf( avctx->subtitle_header = av_asprintf(
"[Script Info]\r\n" "[Script Info]\n"
"ScriptType: v4.00+\r\n" "ScriptType: v4.00+\n"
"PlayResX: %d\r\n" "PlayResX: %d\n"
"PlayResY: %d\r\n" "PlayResY: %d\n"
"WrapStyle: 2\r\n" /* 2: no word wrapping */ "WrapStyle: 2\n" /* 2: no word wrapping */
"\r\n" "\n"
"[V4+ Styles]\r\n" "[V4+ Styles]\n"
"Format: Name, " "Format: Name, "
"Fontname, Fontsize, " "Fontname, Fontsize, "
"PrimaryColour, SecondaryColour, OutlineColour, BackColour, " "PrimaryColour, SecondaryColour, OutlineColour, BackColour, "
@ -538,7 +538,7 @@ static int set_ass_header(ARIBCaptionContext *ctx)
"Spacing, Angle, " "Spacing, Angle, "
"BorderStyle, Outline, Shadow, " "BorderStyle, Outline, Shadow, "
"Alignment, MarginL, MarginR, MarginV, " "Alignment, MarginL, MarginR, MarginV, "
"Encoding\r\n" "Encoding\n"
"Style: " "Style: "
"Default," /* Name */ "Default," /* Name */
@ -549,11 +549,11 @@ static int set_ass_header(ARIBCaptionContext *ctx)
"0,0," /* Spacing, Angle */ "0,0," /* Spacing, Angle */
"%d,%d,%d," /* BorderStyle, Outline, Shadow */ "%d,%d,%d," /* BorderStyle, Outline, Shadow */
"%d,10,10,10," /* Alignment, Margin[LRV] */ "%d,10,10,10," /* Alignment, Margin[LRV] */
"0\r\n" /* Encoding */ "0\n" /* Encoding */
"\r\n" "\n"
"[Events]\r\n" "[Events]\n"
"Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\r\n", "Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\n",
ctx->plane_width, ctx->plane_height, ctx->plane_width, ctx->plane_height,
font_name, ctx->font_size, font_name, ctx->font_size,
ASS_DEFAULT_COLOR, ASS_DEFAULT_COLOR, ASS_DEFAULT_COLOR, ASS_DEFAULT_COLOR,