History

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

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

Kacper Michajłow committed 2 years ago

Commit 597186b1 parent 0105ff51 file · +13 −13Browse files

Unified · Split

libavcodec/libaribcaption.c+13−13
@@ -522,14 +522,14 @@ static int set_ass_header(ARIBCaptionContext *ctx) · 521 unmodified lines
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) · 2 unmodified lines
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) · 4 unmodified lines
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,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t