You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/libzvbi-teletextdec: change new lines to \n in ASS header
Fixes remaining \r\n is ASS header after57c545090d
. 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 in57c545090d
. Fixes ticket #11545. Fixes:57c545090d
Signed-off-by: Kacper Michajłow <kasper93@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
committed by
Marton Balint
parent
597186b153
commit
eb6dc952cb
@ -91,7 +91,7 @@ static int my_ass_subtitle_header(AVCodecContext *avctx)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
event_pos = strstr(avctx->subtitle_header, "\r\n[Events]\r\n");
|
event_pos = strstr(avctx->subtitle_header, "\n[Events]\n");
|
||||||
if (!event_pos)
|
if (!event_pos)
|
||||||
return AVERROR_BUG;
|
return AVERROR_BUG;
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ static int my_ass_subtitle_header(AVCodecContext *avctx)
|
|||||||
"0,0," /* Spacing, Angle */
|
"0,0," /* Spacing, Angle */
|
||||||
"3,0.1,0," /* BorderStyle, Outline, Shadow */
|
"3,0.1,0," /* BorderStyle, Outline, Shadow */
|
||||||
"5,1,1,1," /* Alignment, Margin[LRV] */
|
"5,1,1,1," /* Alignment, Margin[LRV] */
|
||||||
"0\r\n" /* Encoding */
|
"0\n" /* Encoding */
|
||||||
"Style: "
|
"Style: "
|
||||||
"Subtitle," /* Name */
|
"Subtitle," /* Name */
|
||||||
"Monospace,16," /* Font{name,size} */
|
"Monospace,16," /* Font{name,size} */
|
||||||
@ -116,7 +116,7 @@ static int my_ass_subtitle_header(AVCodecContext *avctx)
|
|||||||
"0,0," /* Spacing, Angle */
|
"0,0," /* Spacing, Angle */
|
||||||
"1,1,1," /* BorderStyle, Outline, Shadow */
|
"1,1,1," /* BorderStyle, Outline, Shadow */
|
||||||
"8,48,48,20," /* Alignment, Margin[LRV] */
|
"8,48,48,20," /* Alignment, Margin[LRV] */
|
||||||
"0\r\n" /* Encoding */
|
"0\n" /* Encoding */
|
||||||
, event_pos);
|
, event_pos);
|
||||||
|
|
||||||
if (!new_header)
|
if (!new_header)
|
||||||
|
Reference in New Issue
Block a user