summaryrefslogtreecommitdiff
path: root/libavcodec/ass.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2016-01-10 16:19:50 +0100
committerClément Bœsch <u@pkh.me>2016-01-10 16:28:14 +0100
commit6d32628bf34972bf6b600c6560a25c329afb62f8 (patch)
tree593d60e7204bb67e0d756d37f94ec880043a74ee /libavcodec/ass.c
parentd86d7b2486cd5c31db8e820d8a89554abf19567e (diff)
downloadffmpeg-6d32628bf34972bf6b600c6560a25c329afb62f8.tar.gz
lavc/ccaption_dec: improve default style
Use monospaced font, and a black box outline.
Diffstat (limited to 'libavcodec/ass.c')
-rw-r--r--libavcodec/ass.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/ass.c b/libavcodec/ass.c
index 336c3084e4..56d452f701 100644
--- a/libavcodec/ass.c
+++ b/libavcodec/ass.c
@@ -30,7 +30,7 @@ int ff_ass_subtitle_header(AVCodecContext *avctx,
const char *font, int font_size,
int color, int back_color,
int bold, int italic, int underline,
- int alignment)
+ int border_style, int alignment)
{
avctx->subtitle_header = av_asprintf(
"[Script Info]\r\n"
@@ -59,7 +59,7 @@ int ff_ass_subtitle_header(AVCodecContext *avctx,
"%d,%d,%d,0," /* Bold, Italic, Underline, StrikeOut */
"100,100," /* Scale{X,Y} */
"0,0," /* Spacing, Angle */
- "1,1,0," /* BorderStyle, Outline, Shadow */
+ "%d,1,0," /* BorderStyle, Outline, Shadow */
"%d,10,10,10," /* Alignment, Margin[LRV] */
"0\r\n" /* Encoding */
@@ -69,7 +69,7 @@ int ff_ass_subtitle_header(AVCodecContext *avctx,
!(avctx->flags & AV_CODEC_FLAG_BITEXACT) ? AV_STRINGIFY(LIBAVCODEC_VERSION) : "",
ASS_DEFAULT_PLAYRESX, ASS_DEFAULT_PLAYRESY,
font, font_size, color, color, back_color, back_color,
- -bold, -italic, -underline, alignment);
+ -bold, -italic, -underline, border_style, alignment);
if (!avctx->subtitle_header)
return AVERROR(ENOMEM);
@@ -86,6 +86,7 @@ int ff_ass_subtitle_header_default(AVCodecContext *avctx)
ASS_DEFAULT_BOLD,
ASS_DEFAULT_ITALIC,
ASS_DEFAULT_UNDERLINE,
+ ASS_DEFAULT_BORDERSTYLE,
ASS_DEFAULT_ALIGNMENT);
}