diff options
author | Clément Bœsch <u@pkh.me> | 2015-02-08 12:32:54 +0100 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2015-05-14 12:11:34 +0200 |
commit | 56bc0a6736cdc7edab837ff8f304661fd16de0e4 (patch) | |
tree | 78952fbedf49aa225755de2387b7bb0911948d28 /libavcodec | |
parent | a2cd07d22a5e10b39f65f2cfcbab921244d32152 (diff) | |
download | ffmpeg-56bc0a6736cdc7edab837ff8f304661fd16de0e4.tar.gz |
avcodec/ass: make default playback resolution available to decoders
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/ass.c | 5 | ||||
-rw-r--r-- | libavcodec/ass.h | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/ass.c b/libavcodec/ass.c index ea247f8ed0..468b8bb6cb 100644 --- a/libavcodec/ass.c +++ b/libavcodec/ass.c @@ -36,8 +36,8 @@ int ff_ass_subtitle_header(AVCodecContext *avctx, "[Script Info]\r\n" "; Script generated by FFmpeg/Lavc%s\r\n" "ScriptType: v4.00+\r\n" - "PlayResX: 384\r\n" - "PlayResY: 288\r\n" + "PlayResX: %d\r\n" + "PlayResY: %d\r\n" "\r\n" "[V4+ Styles]\r\n" @@ -67,6 +67,7 @@ int ff_ass_subtitle_header(AVCodecContext *avctx, "[Events]\r\n" "Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\r\n", !(avctx->flags & 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); diff --git a/libavcodec/ass.h b/libavcodec/ass.h index 77218bf76b..f3046efb79 100644 --- a/libavcodec/ass.h +++ b/libavcodec/ass.h @@ -25,6 +25,9 @@ #include "avcodec.h" #include "libavutil/bprint.h" +#define ASS_DEFAULT_PLAYRESX 384 +#define ASS_DEFAULT_PLAYRESY 288 + /** * @name Default values for ASS style * @{ |