Skip to content

Commit 597186b

Browse files
kasper93cus
authored andcommitted
avcodec/libaribcaption: change new lines to \n in ASS header
Fixes remaining \r\n is ASS header after 57c5450. Signed-off-by: Kacper Michajłow <[email protected]> Signed-off-by: Marton Balint <[email protected]>
1 parent 0105ff5 commit 597186b

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

libavcodec/libaribcaption.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -522,14 +522,14 @@ static int set_ass_header(ARIBCaptionContext *ctx)
522522

523523
av_freep(&avctx->subtitle_header);
524524
avctx->subtitle_header = av_asprintf(
525-
"[Script Info]\r\n"
526-
"ScriptType: v4.00+\r\n"
527-
"PlayResX: %d\r\n"
528-
"PlayResY: %d\r\n"
529-
"WrapStyle: 2\r\n" /* 2: no word wrapping */
530-
"\r\n"
531-
532-
"[V4+ Styles]\r\n"
525+
"[Script Info]\n"
526+
"ScriptType: v4.00+\n"
527+
"PlayResX: %d\n"
528+
"PlayResY: %d\n"
529+
"WrapStyle: 2\n" /* 2: no word wrapping */
530+
"\n"
531+
532+
"[V4+ Styles]\n"
533533
"Format: Name, "
534534
"Fontname, Fontsize, "
535535
"PrimaryColour, SecondaryColour, OutlineColour, BackColour, "
@@ -538,7 +538,7 @@ static int set_ass_header(ARIBCaptionContext *ctx)
538538
"Spacing, Angle, "
539539
"BorderStyle, Outline, Shadow, "
540540
"Alignment, MarginL, MarginR, MarginV, "
541-
"Encoding\r\n"
541+
"Encoding\n"
542542

543543
"Style: "
544544
"Default," /* Name */
@@ -549,11 +549,11 @@ static int set_ass_header(ARIBCaptionContext *ctx)
549549
"0,0," /* Spacing, Angle */
550550
"%d,%d,%d," /* BorderStyle, Outline, Shadow */
551551
"%d,10,10,10," /* Alignment, Margin[LRV] */
552-
"0\r\n" /* Encoding */
553-
"\r\n"
552+
"0\n" /* Encoding */
553+
"\n"
554554

555-
"[Events]\r\n"
556-
"Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\r\n",
555+
"[Events]\n"
556+
"Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\n",
557557
ctx->plane_width, ctx->plane_height,
558558
font_name, ctx->font_size,
559559
ASS_DEFAULT_COLOR, ASS_DEFAULT_COLOR,

0 commit comments

Comments
 (0)