From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 5D219460EF for ; Fri, 5 May 2023 20:01:20 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 128A868BF53; Fri, 5 May 2023 23:01:17 +0300 (EEST) Received: from shout01.mail.de (shout01.mail.de [62.201.172.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9194168BDF2 for ; Fri, 5 May 2023 23:01:10 +0300 (EEST) Received: from postfix03.mail.de (postfix03.bt.mail.de [10.0.121.127]) by shout01.mail.de (Postfix) with ESMTP id 379D0A1775 for ; Fri, 5 May 2023 22:01:10 +0200 (CEST) Received: from smtp01.mail.de (smtp01.bt.mail.de [10.0.121.211]) by postfix03.mail.de (Postfix) with ESMTP id 1D3D5801F3 for ; Fri, 5 May 2023 22:01:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.de; s=mailde202009; t=1683316870; bh=vjyKQ5FZVWhiKAee0ilEigSw1qQWNhdMrYoqYque+pw=; h=Message-ID:Date:Subject:To:From:From:To:CC:Subject:Reply-To; b=hg5Uw9mEwdRRfRtUnsGYWukrhpwrg1076g8pIuZVGqR/zosMtEH48WPugc0/pYUkT mJ8jlQcEPngL5/Ryn0BjDP0YFheA/4fiwaAWlzenEixZ3DA8N9jodxvoiftgadKUM/ dXQxunxE4X1Tg2Cj9wo+JNiSe6uH81W9Fht1peJKCjdy+ysQi9LcJpQqcoIScFT3I0 CD8HMJmboRYnDQGq+1nt8+qX5H+M+RcTsqyd3zSHCi4WkGUY/SdUy5YcVysp9n46hc JHuTxwUjUptji+H3JyFpkwEqzGjVmkm/ktafuMQKxF5C/kZaZypyz5FnFNdQL6+ExT ZGFrxKwF0VVjA== Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtp01.mail.de (Postfix) with ESMTPSA id CFC4B100156 for ; Fri, 5 May 2023 22:01:09 +0200 (CEST) Message-ID: Date: Fri, 5 May 2023 22:01:08 +0200 MIME-Version: 1.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20230419104250.21354-1-epirat07@gmail.com> <20230501121842.18868-1-epirat07@gmail.com> From: Thilo Borgmann In-Reply-To: <20230501121842.18868-1-epirat07@gmail.com> X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-purgate-size: 2368 X-purgate-ID: 154282::1683316869-827FC7B6-C5E8338A/0/0 Subject: Re: [FFmpeg-devel] [PATCH 1/2] avfilter/vf_tpad: use enum for start/stop_mode X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Hi, Am 01.05.23 um 14:18 schrieb Marvin Scholz: > --- > libavfilter/vf_tpad.c | 24 +++++++++++++++--------- > 1 file changed, 15 insertions(+), 9 deletions(-) > > diff --git a/libavfilter/vf_tpad.c b/libavfilter/vf_tpad.c > index f0c065f0c3..88c3c99de4 100644 > --- a/libavfilter/vf_tpad.c > +++ b/libavfilter/vf_tpad.c > @@ -27,6 +27,12 @@ > #include "formats.h" > #include "drawutils.h" > > +enum PadMode { > + MODE_ADD = 0, > + MODE_CLONE, > + NB_MODE > +}; > + > typedef struct TPadContext { > const AVClass *class; > int pad_start; > @@ -51,10 +57,10 @@ typedef struct TPadContext { > static const AVOption tpad_options[] = { > { "start", "set the number of frames to delay input", OFFSET(pad_start), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, VF }, > { "stop", "set the number of frames to add after input finished", OFFSET(pad_stop), AV_OPT_TYPE_INT, {.i64=0}, -1, INT_MAX, VF }, > - { "start_mode", "set the mode of added frames to start", OFFSET(start_mode), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, VF, "mode" }, > - { "add", "add solid-color frames", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, VF, "mode" }, > - { "clone", "clone first/last frame", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, VF, "mode" }, > - { "stop_mode", "set the mode of added frames to end", OFFSET(stop_mode), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, VF, "mode" }, > + { "start_mode", "set the mode of added frames to start", OFFSET(start_mode), AV_OPT_TYPE_INT, {.i64=MODE_ADD}, 0, NB_MODE-1, VF, "mode" }, > + { "add", "add solid-color frames", 0, AV_OPT_TYPE_CONST, {.i64=MODE_ADD}, 0, 0, VF, "mode" }, > + { "clone", "clone first/last frame", 0, AV_OPT_TYPE_CONST, {.i64=MODE_CLONE}, 0, 0, VF, "mode" }, > + { "stop_mode", "set the mode of added frames to end", OFFSET(stop_mode), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_MODE-1, VF, "mode" }, I think you wanted to use MODE_ADD to init this as well. Otherwise LGTM. -Thilo _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".