Commit 56bc0a67 authored by Clément Bœsch's avatar Clément Bœsch

avcodec/ass: make default playback resolution available to decoders

parent a2cd07d2
...@@ -36,8 +36,8 @@ int ff_ass_subtitle_header(AVCodecContext *avctx, ...@@ -36,8 +36,8 @@ int ff_ass_subtitle_header(AVCodecContext *avctx,
"[Script Info]\r\n" "[Script Info]\r\n"
"; Script generated by FFmpeg/Lavc%s\r\n" "; Script generated by FFmpeg/Lavc%s\r\n"
"ScriptType: v4.00+\r\n" "ScriptType: v4.00+\r\n"
"PlayResX: 384\r\n" "PlayResX: %d\r\n"
"PlayResY: 288\r\n" "PlayResY: %d\r\n"
"\r\n" "\r\n"
"[V4+ Styles]\r\n" "[V4+ Styles]\r\n"
...@@ -67,6 +67,7 @@ int ff_ass_subtitle_header(AVCodecContext *avctx, ...@@ -67,6 +67,7 @@ int ff_ass_subtitle_header(AVCodecContext *avctx,
"[Events]\r\n" "[Events]\r\n"
"Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\r\n", "Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\r\n",
!(avctx->flags & CODEC_FLAG_BITEXACT) ? AV_STRINGIFY(LIBAVCODEC_VERSION) : "", !(avctx->flags & CODEC_FLAG_BITEXACT) ? AV_STRINGIFY(LIBAVCODEC_VERSION) : "",
ASS_DEFAULT_PLAYRESX, ASS_DEFAULT_PLAYRESY,
font, font_size, color, color, back_color, back_color, font, font_size, color, color, back_color, back_color,
-bold, -italic, -underline, alignment); -bold, -italic, -underline, alignment);
......
...@@ -25,6 +25,9 @@ ...@@ -25,6 +25,9 @@
#include "avcodec.h" #include "avcodec.h"
#include "libavutil/bprint.h" #include "libavutil/bprint.h"
#define ASS_DEFAULT_PLAYRESX 384
#define ASS_DEFAULT_PLAYRESY 288
/** /**
* @name Default values for ASS style * @name Default values for ASS style
* @{ * @{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment