Skip to content

Commit eb6dc95

Browse files
kasper93cus
authored andcommitted
avcodec/libzvbi-teletextdec: change new lines to \n in ASS header
Fixes remaining \r\n is ASS header after 57c5450. 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 57c5450. Fixes ticket #11545. Fixes: 57c5450 Signed-off-by: Kacper Michajłow <[email protected]> Signed-off-by: Marton Balint <[email protected]>
1 parent 597186b commit eb6dc95

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libavcodec/libzvbi-teletextdec.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static int my_ass_subtitle_header(AVCodecContext *avctx)
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)
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)
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)

0 commit comments

Comments
 (0)