frei0r: handle string params
authorRaphael Graf <r@undefined.ch>
Wed, 29 Aug 2018 10:29:16 +0000 (12:29 +0200)
committerPaul B Mahol <onemda@gmail.com>
Thu, 30 Aug 2018 07:57:25 +0000 (09:57 +0200)
This is needed for some of the frei0r filters (facebl0r and facedetect) which accept string parameters.

Fixes the issue described here:
http://www.ffmpeg-archive.org/Unable-to-set-ffmpeg-frei0r-facedetect-filter-parameter-td4680190.html

Signed-off-by: Raphael Graf <r@undefined.ch>
libavfilter/vf_frei0r.c

index 8aeac08..67b2f37 100644 (file)
@@ -93,6 +93,7 @@ static int set_param(AVFilterContext *ctx, f0r_param_info_t info, int index, cha
         double d;
         f0r_param_color_t col;
         f0r_param_position_t pos;
+        f0r_param_string *str;
     } val;
     char *tail;
     uint8_t rgba[4];
@@ -126,6 +127,11 @@ static int set_param(AVFilterContext *ctx, f0r_param_info_t info, int index, cha
         break;
     }
 
+    case F0R_PARAM_STRING:
+        val.str = param;
+        break;
+    }
+
     s->set_param_value(s->instance, &val, index);
     return 0;