summaryrefslogtreecommitdiff
path: root/libavcodec/ass.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2014-10-11 14:31:23 +0200
committerClément Bœsch <u@pkh.me>2014-10-15 19:25:06 +0200
commit40b9f28641b696c6bb73ce49dc97c2ce2700cbdb (patch)
treeb16bbe05514768ba5c8b8b20b7cb0eba7d72ccf2 /libavcodec/ass.c
parentbf700a995da4ff3ef891f3d4621b01fe72d0b12d (diff)
downloadffmpeg-40b9f28641b696c6bb73ce49dc97c2ce2700cbdb.tar.gz
avcodec/ass: output missing fields in AVSubtitles and output files
Fixes Ticket #3207
Diffstat (limited to 'libavcodec/ass.c')
-rw-r--r--libavcodec/ass.c29
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");