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.
Unified · Split
| @@ -91,7 +91,7 @@ static int my_ass_subtitle_header(AVCodecContext *avctx) · 90 unmodified lines | ||
| 91 | 91 | if (ret < 0) |
| 92 | 92 | return ret; |
| 93 | 93 | |
| 94 | − event_pos = strstr(avctx->subtitle_header, "\r\n[Events]\r\n"); | |
| 94 | + event_pos = strstr(avctx->subtitle_header, "\n[Events]\n"); | |
| 95 | 95 | if (!event_pos) |
| 96 | 96 | return AVERROR_BUG; |
| 97 | 97 | |
| @@ -106,7 +106,7 @@ static int my_ass_subtitle_header(AVCodecContext *avctx) · 8 unmodified lines | ||
| 106 | 106 | "0,0," /* Spacing, Angle */ |
| 107 | 107 | "3,0.1,0," /* BorderStyle, Outline, Shadow */ |
| 108 | 108 | "5,1,1,1," /* Alignment, Margin[LRV] */ |
| 109 | − "0\r\n" /* Encoding */ | |
| 109 | + "0\n" /* Encoding */ | |
| 110 | 110 | "Style: " |
| 111 | 111 | "Subtitle," /* Name */ |
| 112 | 112 | "Monospace,16," /* Font{name,size} */ |
| @@ -116,7 +116,7 @@ static int my_ass_subtitle_header(AVCodecContext *avctx) · 3 unmodified lines | ||
| 116 | 116 | "0,0," /* Spacing, Angle */ |
| 117 | 117 | "1,1,1," /* BorderStyle, Outline, Shadow */ |
| 118 | 118 | "8,48,48,20," /* Alignment, Margin[LRV] */ |
| 119 | − "0\r\n" /* Encoding */ | |
| 119 | + "0\n" /* Encoding */ | |
| 120 | 120 | , event_pos); |
| 121 | 121 | |
| 122 | 122 | if (!new_header) |