diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-04 02:08:56 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-04 02:08:56 +0100 |
commit | 297422b338656b22f0a2a844c8297e81e0bcdf1f (patch) | |
tree | 45c47a819ba4b3f3ad271d69554060ee70238f12 /libavfilter | |
parent | fb266f59739fd6d44241cde6da2fe010e5f40e76 (diff) | |
download | ffmpeg-297422b338656b22f0a2a844c8297e81e0bcdf1f.tar.gz |
vf_drawtext: Add main_w/h to improve compatibility with the modified UI
from the fork.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_drawtext.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 43d39c0ad2..b81a7c909d 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -47,8 +47,8 @@ #include FT_GLYPH_H static const char * const var_names[] = { - "w", ///< width of the input video - "h", ///< height of the input video + "main_w", "w", ///< width of the input video + "main_h", "h", ///< height of the input video "tw", "text_w", ///< width of the rendered text "th", "text_h", ///< height of the rendered text "max_glyph_w", ///< max glyph width @@ -68,8 +68,8 @@ static const char * const var_names[] = { }; enum var_name { - VAR_W, - VAR_H, + VAR_MAIN_W, VAR_W, + VAR_MAIN_H, VAR_H, VAR_TW, VAR_TEXT_W, VAR_TH, VAR_TEXT_H, VAR_MAX_GLYPH_W, @@ -453,8 +453,8 @@ static int config_input(AVFilterLink *inlink) dtext->shadowcolor[3] = rgba[3]; } - dtext->var_values[VAR_W] = inlink->w; - dtext->var_values[VAR_H] = inlink->h; + dtext->var_values[VAR_W] = dtext->var_values[VAR_MAIN_W] = inlink->w; + dtext->var_values[VAR_H] = dtext->var_values[VAR_MAIN_H] = inlink->h; dtext->var_values[VAR_SAR] = inlink->sample_aspect_ratio.num ? av_q2d(inlink->sample_aspect_ratio) : 1; dtext->var_values[VAR_DAR] = (double)inlink->w / inlink->h * dtext->var_values[VAR_SAR]; dtext->var_values[VAR_HSUB] = 1<<pix_desc->log2_chroma_w; |