]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_drawtext.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavfilter / vf_drawtext.c
index a8d3517b99c30248e5aa55f1e7ef30bd0bc1b9ed..7d4476f849d8334a0abd65eb48b0ada7c021ce8d 100644 (file)
@@ -22,7 +22,7 @@
 
 /**
  * @file
- * drawtext filter, based on the original FFmpeg vhook/drawtext.c
+ * drawtext filter, based on the original vhook/drawtext.c
  * filter by Gustavo Sverzut Barbieri
  */
 
 #include FT_FREETYPE_H
 #include FT_GLYPH_H
 
-static const char *var_names[] = {
-    "E",
-    "PHI",
-    "PI",
+static const char * const var_names[] = {
     "w",                      ///< width  of the input video
     "h",                      ///< height of the input video
     "tw", "text_w",           ///< width  of the rendered text
@@ -71,9 +68,6 @@ static const char *var_names[] = {
 };
 
 enum var_name {
-    VAR_E,
-    VAR_PHI,
-    VAR_PI,
     VAR_W,
     VAR_H,
     VAR_TW, VAR_TEXT_W,
@@ -459,9 +453,6 @@ static int config_input(AVFilterLink *inlink)
         dtext->shadowcolor[3] = rgba[3];
     }
 
-    dtext->var_values[VAR_E]     = M_E;
-    dtext->var_values[VAR_PHI]   = M_PHI;
-    dtext->var_values[VAR_PI]    = M_PI;
     dtext->var_values[VAR_W]     = inlink->w;
     dtext->var_values[VAR_H]     = inlink->h;
     dtext->var_values[VAR_SAR]   = inlink->sample_aspect_ratio.num ? av_q2d(inlink->sample_aspect_ratio) : 1;
@@ -832,7 +823,7 @@ AVFilter avfilter_vf_drawtext = {
     .uninit        = uninit,
     .query_formats = query_formats,
 
-    .inputs    = (AVFilterPad[]) {{ .name             = "default",
+    .inputs    = (const AVFilterPad[]) {{ .name       = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO,
                                     .get_video_buffer = avfilter_null_get_video_buffer,
                                     .start_frame      = avfilter_null_start_frame,
@@ -843,7 +834,7 @@ AVFilter avfilter_vf_drawtext = {
                                                         AV_PERM_READ,
                                     .rej_perms        = AV_PERM_PRESERVE },
                                   { .name = NULL}},
-    .outputs   = (AVFilterPad[]) {{ .name             = "default",
+    .outputs   = (const AVFilterPad[]) {{ .name       = "default",
                                     .type             = AVMEDIA_TYPE_VIDEO, },
                                   { .name = NULL}},
     .process_command = command,