From patchwork Wed Aug 29 10:29:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raphael Graf X-Patchwork-Id: 10169 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:12c4:0:0:0:0:0 with SMTP id 65-v6csp539397jap; Wed, 29 Aug 2018 03:29:26 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbD3hcACXzujnoqU+sn5T5Z39BFVgYtuCWgN5YxkKLLzMG2H+Hzih2Q41F+RqhXQAi0zwFb X-Received: by 2002:a5d:4cc8:: with SMTP id c8-v6mr3949723wrt.210.1535538565937; Wed, 29 Aug 2018 03:29:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535538565; cv=none; d=google.com; s=arc-20160816; b=nFhx1kKWGXT/+16W31G5qWzouj4ZczE5DCF31sx+JcvbEMBM3oYCLWRSIL7WcJRh+B 4Y9YXQtTEEKza4OsZOjU7vzar7eIWPzOYB+2yUIFuCwxcoNGJxwzWEwbeR4bz69McKHQ zJdiiVQYCq0McjWhWEorcscXBTlTNErDyYMAqaNH5xLwx6u5chxLddeozCd0RQmiMEi6 guVOxpACv6ZO1fdZWjeAOljoftoTn+f8uRxv1aRgcW0DQU/+DKdd3WfLA20FHGsXERqg buVjjltJ2aoBMX6Y/GnHu8IbpHFZb1OcgkQIjI72/It7ajMVAS4/LN0sKA2eKu3Bxt1x NBlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:importance:mime-version:user-agent:to:from:date :message-id:delivered-to:arc-authentication-results; bh=B5z4tjLiv9qK4TS34vZmox8h5/FFUqE21k0AwGEirzc=; b=EQNwdXLATnaQGWBv+FXetxEKCh9t2MzHpOETSsxZ9QxYLk/eGDWTql0Sbb9sfHSHUd kZt+gRkRLLA2wHBFTeAJKAajBRBcYA2ZQpB0YzhJ/KKuVQoOVVPbyFA0y+VKQyNo695k 73WXfAC1gbcmoKMXyEryhwjNDQ8OMlo0izergkqTFDvCG/Q9819lsvj+WILWOHMmCBI+ qT2XqJLPrtIIOwhVTVDQ8eHmbueJGKPRlkwgcJSTCkZ2ESDr6CP//ngVDBF9CbTjQa8u 0sZTmh3XApyahVkvgKJXAfOz6hYqvVTo0PF8UucdcvxQIMqvC8nYJ/ih+jyQWt00HFHr zu/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id b196-v6si3057879wme.106.2018.08.29.03.29.24; Wed, 29 Aug 2018 03:29:25 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5986D689F26; Wed, 29 Aug 2018 13:29:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail2.hostpark.net (mail2.hostpark.net [212.243.197.32]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BF836689EE7 for ; Wed, 29 Aug 2018 13:29:12 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by mail2.hostpark.net (Postfix) with ESMTP id 941A816932 for ; Wed, 29 Aug 2018 12:29:16 +0200 (CEST) X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Received: from mail2.hostpark.net ([127.0.0.1]) by localhost (mail2.hostpark.net [127.0.0.1]) (amavisd-new, port 10124) with ESMTP id pXP8EjLrIrCp for ; Wed, 29 Aug 2018 12:29:16 +0200 (CEST) Received: from www6.hostpark.net (unknown [10.0.0.26]) by mail2.hostpark.net (Postfix) with ESMTP id 6DA5E16900 for ; Wed, 29 Aug 2018 12:29:16 +0200 (CEST) Received: from squirrel.hostpark.net (localhost [127.0.0.1]) by www6.hostpark.net (Postfix) with ESMTP id 607271000AE for ; Wed, 29 Aug 2018 12:29:16 +0200 (CEST) X-Squirrel-UserHash: KhgtNjw9PjE2PTx2OzA= X-Squirrel-FromHash: Omo7bT1hb2s= Message-ID: Date: Wed, 29 Aug 2018 12:29:16 +0200 From: "Raphael Graf" To: ffmpeg-devel@ffmpeg.org User-Agent: SquirrelMail/1.4.23 [SVN] MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal Subject: [FFmpeg-devel] [PATCH] frei0r: handle string params X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 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 --- libavfilter/vf_frei0r.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index 8aeac08519..67b2f374c3 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -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;