diff mbox series

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

Message ID 20240413151838.520-1-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/libaribb24.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/libaribb24.c b/libavcodec/libaribb24.c
index 009c995ded..0e4fa9935c 100644
--- a/libavcodec/libaribb24.c
+++ b/libavcodec/libaribb24.c
@@ -96,13 +96,13 @@  static int libaribb24_generate_ass_header(AVCodecContext *avctx)
     font_size = get_profile_font_size(avctx);
 
     avctx->subtitle_header = av_asprintf(
-             "[Script Info]\r\n"
-             "; Script generated by FFmpeg/Lavc%s\r\n"
-             "ScriptType: v4.00+\r\n"
-             "PlayResX: %d\r\n"
-             "PlayResY: %d\r\n"
-             "\r\n"
-             "[V4+ Styles]\r\n"
+             "[Script Info]\n"
+             "; Script generated by FFmpeg/Lavc%s\n"
+             "ScriptType: v4.00+\n"
+             "PlayResX: %d\n"
+             "PlayResY: %d\n"
+             "\n"
+             "[V4+ Styles]\n"
 
              /* ASSv4 header */
              "Format: Name, "
@@ -113,7 +113,7 @@  static int libaribb24_generate_ass_header(AVCodecContext *avctx)
              "Spacing, Angle, "
              "BorderStyle, Outline, Shadow, "
              "Alignment, MarginL, MarginR, MarginV, "
-             "Encoding\r\n"
+             "Encoding\n"
 
              "Style: "
              "Default,"             /* Name */
@@ -124,11 +124,11 @@  static int libaribb24_generate_ass_header(AVCodecContext *avctx)
              "0,0,"                 /* Spacing, Angle */
              "%d,1,0,"              /* BorderStyle, Outline, Shadow */
              "%d,10,10,10,"         /* Alignment, Margin[LRV] */
-             "0\r\n"                /* Encoding */
+             "0\n"                  /* Encoding */
 
-             "\r\n"
-             "[Events]\r\n"
-             "Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\r\n",
+             "\n"
+             "[Events]\n"
+             "Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\n",
              !(avctx->flags & AV_CODEC_FLAG_BITEXACT) ? AV_STRINGIFY(LIBAVCODEC_VERSION) : "",
              plane_width, plane_height,
              ASS_DEFAULT_FONT, font_size, ASS_DEFAULT_COLOR,