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 1AB9746843 for ; Sun, 16 Jun 2024 16:04:41 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EE06B68D728; Sun, 16 Jun 2024 19:04:38 +0300 (EEST) Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 75E8868D6B7 for ; Sun, 16 Jun 2024 19:04:32 +0300 (EEST) Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a6f0dc80ab9so569966366b.2 for ; Sun, 16 Jun 2024 09:04:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718553871; x=1719158671; darn=ffmpeg.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=g3sAEf3X5YDhTjsnKIqbgdjk6Fmzqev/VaAxaQT76w0=; b=m7ue/JNSmAdsdFghCzScqPHAqENmwjKu5g5zoS4b67wcwZOC1JCvjCkb7NKN4DP3rq 3IsKW48oJTxTCYVhIPjEagsLcQxkvaEca2Aq6sjYTyq7F14de+lv4opwmildQU8vl2yE xDNoXpfF1Kaf4vmexir56uWOO3HomkXEk7dHVKZMIMyvhN8n2iC7x7HHp043di3du7Or iP7GbWoazQdCQE1Niq6S3uagAntGlXNRg7PM3qdpOjjotndQ1QHRvnz3sTAtqv4yhp5W GruRd7C/2+AJmTAu+z+uma1TG3nBTnFfBsByG3gfq3teFmSNxOECoXuubec1yovbiI82 12PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718553871; x=1719158671; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=g3sAEf3X5YDhTjsnKIqbgdjk6Fmzqev/VaAxaQT76w0=; b=FhZ7j3ok3OtW2OUd3J6vu7aynf2hkBfIR0F9zfD1knQw1cfSmV5d5dylYWklTLRTxQ 6qX5/SOaCZiAaFg+OMFnvg6mg1QIcENiYB4sxxhqEPpkOyU4qqiIo3EQVrVqWCpscXxC h+OpbPRWTOg2AEKdXtrgAYWmIw4pC3Z8o9NmYGhISTsIwn9r2fDwBcJyFElXGJYYlww3 IsQWIAHOU3kNxJugLiX+eDeaEFxx4TirBC0gyV5u+w0vgM1VPqsdxuSYYDxVG39lsKSG URW8WKyAraTGfQ1jj01taVzJkDHPS2s3PmWx40wufj+YykHBWtCwAhaGpnK54ihjwBtb wsFw== X-Gm-Message-State: AOJu0YxTDjx9oNiAS3XfQ269Blw2+mzzGnh8+M7m3D6KQ+OR/gLb9Weq MKyJ4AGZovOEMCBgazLpT+cDqcC9NGAyhInu8zi/v11NJrHyy2sFR4WNWg== X-Google-Smtp-Source: AGHT+IE1DKRQ0YgWffcH5VHyRMbYsn0qG/VSpZ5WlVKVBNp+OgOGg0iIe+LISm3QSuKkaaLZQPa4KQ== X-Received: by 2002:a17:906:5913:b0:a6c:6fac:f1ff with SMTP id a640c23a62f3a-a6f60cf2cd2mr512942166b.12.1718553870648; Sun, 16 Jun 2024 09:04:30 -0700 (PDT) Received: from mariano (host-95-237-6-247.retail.telecomitalia.it. [95.237.6.247]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56db67c4sm421546866b.60.2024.06.16.09.04.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jun 2024 09:04:30 -0700 (PDT) Received: by mariano (Postfix, from userid 1000) id C7D58BFCE8; Sun, 16 Jun 2024 18:04:21 +0200 (CEST) Date: Sun, 16 Jun 2024 18:04:21 +0200 From: Stefano Sabatini To: FFmpeg development discussions and patches Message-ID: Mail-Followup-To: FFmpeg development discussions and patches , Andrew Sayers References: <20240606160206.501956-1-ffmpeg-devel@pileofstuff.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240606160206.501956-1-ffmpeg-devel@pileofstuff.org> User-Agent: Mutt/2.1.4 (2021-12-11) Subject: Re: [FFmpeg-devel] [PATCH v2] lavu/opt: Discuss AV_OPT_FLAG_RUNTIME_PARAM more explicitly 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 Cc: Andrew Sayers Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On date Thursday 2024-06-06 17:02:06 +0100, Andrew Sayers wrote: > After a struct is initialized, only options with the > AV_OPT_FLAG_RUNTIME_PARAM flag can be modified. > > Make that clearer, for the sake of readers who would otherwise > assume all options can be modified at any time. > --- > libavutil/opt.h | 26 +++++++++++++++++++++++++- > 1 file changed, 25 insertions(+), 1 deletion(-) > > diff --git a/libavutil/opt.h b/libavutil/opt.h > index 07e27a9208..d23c10bcf5 100644 > --- a/libavutil/opt.h > +++ b/libavutil/opt.h > @@ -53,6 +53,9 @@ > * question is allowed to access the field. This allows us to extend the > * semantics of those fields without breaking API compatibility. > * > + * Note: only options with the AV_OPT_FLAG_RUNTIME_PARAM flag can be > + * modified after the struct is initialized. > + * > * @section avoptions_scope Scope of AVOptions > * > * AVOptions is designed to support any set of multimedia configuration options > @@ -300,7 +303,7 @@ enum AVOptionType{ > #define AV_OPT_FLAG_BSF_PARAM (1 << 8) > > /** > - * A generic parameter which can be set by the user at runtime. > + * A generic parameter which can be set by the user after initialization. > */ > #define AV_OPT_FLAG_RUNTIME_PARAM (1 << 15) I'm fine with changing the description, but then I wonder if we should also rename the flag accordingly (by adding a new alias and deprecating the old one): AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM ?? > /** > @@ -483,6 +486,9 @@ typedef struct AVOptionRanges { > /** > * Set the values of all AVOption fields to their default values. > * > + * Note: after a struct is initialized, only options with the > + * AV_OPT_FLAG_RUNTIME_PARAM flag can be modified. > + * drop this note and the following ones, this is assumed by the flags so there is no need to repeat this all over _______________________________________________ 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".