diff options
author | Clément Bœsch <u@pkh.me> | 2014-10-11 14:31:23 +0200 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2014-10-15 19:25:06 +0200 |
commit | 40b9f28641b696c6bb73ce49dc97c2ce2700cbdb (patch) | |
tree | b16bbe05514768ba5c8b8b20b7cb0eba7d72ccf2 /libavcodec | |
parent | bf700a995da4ff3ef891f3d4621b01fe72d0b12d (diff) | |
download | ffmpeg-40b9f28641b696c6bb73ce49dc97c2ce2700cbdb.tar.gz |
avcodec/ass: output missing fields in AVSubtitles and output files
Fixes Ticket #3207
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/ass.c | 29 | ||||
-rw-r--r-- | libavcodec/version.h | 2 |
2 files changed, 26 insertions, 5 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"); diff --git a/libavcodec/version.h b/libavcodec/version.h index ab52d5cf16..1efe55c621 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 56 -#define LIBAVCODEC_VERSION_MINOR 7 +#define LIBAVCODEC_VERSION_MINOR 8 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |