History

avcodec/libzvbi-teletextdec: change new lines to \n in ASS header

Fixes remaining \r\n is ASS header after 57c545090d. Fixes AVERROR_BUG error during init as this decoder expected `\r\n` in default ASS header. strstr(..., "\r\n[Events]\r\n") failed after changes in 57c545090d. Fixes ticket #11545.

Kacper Michajłow committed 2 years ago

Commit eb6dc951 parent 597186b1 file · +3 −3Browse files

Unified · Split

libavcodec/libzvbi-teletextdec.c+3−3
@@ -91,7 +91,7 @@ static int my_ass_subtitle_header(AVCodecContext *avctx) · 90 unmodified lines
9191 if (ret < 0)
9292 return ret;
9393
94− event_pos = strstr(avctx->subtitle_header, "\r\n[Events]\r\n");
94+ event_pos = strstr(avctx->subtitle_header, "\n[Events]\n");
9595 if (!event_pos)
9696 return AVERROR_BUG;
9797
@@ -106,7 +106,7 @@ static int my_ass_subtitle_header(AVCodecContext *avctx) · 8 unmodified lines
106106 "0,0," /* Spacing, Angle */
107107 "3,0.1,0," /* BorderStyle, Outline, Shadow */
108108 "5,1,1,1," /* Alignment, Margin[LRV] */
109− "0\r\n" /* Encoding */
109+ "0\n" /* Encoding */
110110 "Style: "
111111 "Subtitle," /* Name */
112112 "Monospace,16," /* Font{name,size} */
@@ -116,7 +116,7 @@ static int my_ass_subtitle_header(AVCodecContext *avctx) · 3 unmodified lines
116116 "0,0," /* Spacing, Angle */
117117 "1,1,1," /* BorderStyle, Outline, Shadow */
118118 "8,48,48,20," /* Alignment, Margin[LRV] */
119− "0\r\n" /* Encoding */
119+ "0\n" /* Encoding */
120120 , event_pos);
121121
122122 if (!new_header)

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