diff options
Diffstat (limited to 'libavcodec/ass.c')
-rw-r--r-- | libavcodec/ass.c | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/libavcodec/ass.c b/libavcodec/ass.c index ba0593c936..ac1bfae061 100644 --- a/libavcodec/ass.c +++ b/libavcodec/ass.c @@ -39,11 +39,32 @@ int ff_ass_subtitle_header(AVCodecContext *avctx, "PlayResY: 288\r\n" "\r\n" "[V4+ Styles]\r\n" - "Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding\r\n" - "Style: Default,%s,%d,&H%x,&H%x,&H%x,&H%x,%d,%d,%d,1,1,0,%d,10,10,10,0,0\r\n" + + /* ASSv4 header */ + "Format: Name, " + "Fontname, Fontsize, " + "PrimaryColour, SecondaryColour, OutlineColour, BackColour, " + "Bold, Italic, Underline, StrikeOut, " + "ScaleX, ScaleY, " + "Spacing, Angle, " + "BorderStyle, Outline, Shadow, " + "Alignment, MarginL, MarginR, MarginV, " + "Encoding\r\n" + + "Style: " + "Default," /* Name */ + "%s,%d," /* Font{name,size} */ + "&H%x,&H%x,&H%x,&H%x," /* {Primary,Secondary,Outline,Back}Colour */ + "%d,%d,%d,0," /* Bold, Italic, Underline, StrikeOut */ + "100,100," /* Scale{X,Y} */ + "0,0," /* Spacing, Angle */ + "1,1,0," /* BorderStyle, Outline, Shadow */ + "%d,10,10,10," /* Alignment, Margin[LRV] */ + "0\r\n" /* Encoding */ + "\r\n" "[Events]\r\n" - "Format: Layer, Start, End, Style, Text\r\n", + "Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\r\n", font, font_size, color, color, back_color, back_color, -bold, -italic, -underline, alignment); @@ -104,7 +125,7 @@ int ff_ass_bprint_dialog(AVBPrint *buf, const char *dialog, insert_ts(buf, ts_start); insert_ts(buf, duration == -1 ? -1 : ts_start + duration); if (raw != 2) - av_bprintf(buf, "Default,"); + av_bprintf(buf, "Default,,0,0,0,,"); } dlen = strcspn(dialog, "\n"); |