diff mbox series

[FFmpeg-devel,2/3] avcodec/libaribcaption: change new lines to \n in ASS header

Message ID 20240413151838.520-2-kasper93@gmail.com
State New
Headers show
Series [FFmpeg-devel,1/3] avcodec/libaribb24: change new lines to \n in ASS header | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Kacper Michajłow April 13, 2024, 3:18 p.m. UTC
Fixes remaining \r\n is ASS header after 57c545090d.
---
 libavcodec/libaribcaption.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
diff mbox series

Patch

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