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 98497440BC for ; Thu, 25 Aug 2022 19:28:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 90B1A68B9B7; Thu, 25 Aug 2022 22:28:08 +0300 (EEST) Received: from mail-vk1-f171.google.com (mail-vk1-f171.google.com [209.85.221.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A17E368B5CD for ; Thu, 25 Aug 2022 22:28:02 +0300 (EEST) Received: by mail-vk1-f171.google.com with SMTP id g185so8237176vkb.13 for ; Thu, 25 Aug 2022 12:28:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=tAy24oHTEas6XieiMncpAsg3dWnBhOH6X8AGkAMCUqM=; b=iY6YFP5NnrAZfQ9b8D6PmwUxpodSWHmbiWqWGv2XzK5jb1oOEzMzxfFNx25LTHWTrs BkU13znH4WHCnpzQk+lsfjLkWE5WS4CImiwzLp12FpAx8yTSp8+2ve7OPKROgyWu+t83 2v+IGfzHrdU+RPKWU73UeHHL+R6UC4W329eD+p1KZnsyNIBWqBwQPbBSwMODVsPw3WQf Tzm427vX6dM/lyNmdn6+v4pAc6oc3vlasyJn9FkIJi7ze6BlEayg73gA18pjYcZBPvws PZoC/bfHywel7x2yki8lWBJEA4nFlnq1LC8kJ9Z7HfmILD+oWy0dNM8WuiMddUAPmO7c CGwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=tAy24oHTEas6XieiMncpAsg3dWnBhOH6X8AGkAMCUqM=; b=gJxaLUg9QRzqWGfps+uE/wqJGOaldcDU3RnQZ1H3xG0uvk62tXke9Tc/AeLrbRIynt XSwESpw/xZmq52iUBq/wanLMTdh6dWk8Dr6lNHuO2e+o8vH6m3kFCH36wzkadwQWqRSJ PzVo7Vi90syAhb2R+9ljJoiBou7mldfpkhEP1NaUbe7hq1YfbGq3cc5lXJPClmCAz5Y6 4nECsiKx5VxQRVPPQMPmGP/vPGa+BOSvDEP4l79uycqfVMshwp4/tDwbtkb8TcaTLtXO TByZa07swKTy9qTRyhtlvNduC8KKe/hR3+R7xyj+InlVV7ZfTLueX86IeXti4pdS/nst Dc2A== X-Gm-Message-State: ACgBeo0v0X1mH2eqaYfjNQ/kPpBVDux0Iy/GjUUVLuZVdvs6UHCR7Ze9 9OI3m6Gdk/HNKq21wMueI395n6wB/kE= X-Google-Smtp-Source: AA6agR4enAOWUte75E1dXD5bTofIbhHvndp7KyELC0kWatPq3vUMW2l/bZBlJs9Stzr/QGtiA2qJQw== X-Received: by 2002:a1f:9b57:0:b0:379:1632:8dda with SMTP id d84-20020a1f9b57000000b0037916328ddamr2038732vke.15.1661455680754; Thu, 25 Aug 2022 12:28:00 -0700 (PDT) Received: from [192.168.0.13] ([191.97.187.183]) by smtp.gmail.com with ESMTPSA id z190-20020a1fc9c7000000b003777cf035a4sm16174015vkf.33.2022.08.25.12.27.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 12:28:00 -0700 (PDT) Message-ID: Date: Thu, 25 Aug 2022 16:28:00 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20220825171618.1264-1-jamrial@gmail.com> <11620435-fb87-7dba-f761-411bb0bb683b@gmail.com> From: James Almer In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] avcodec/libaomenc: add init cleanup flag 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: On 8/25/2022 4:21 PM, James Zern wrote: > On Thu, Aug 25, 2022 at 10:39 AM James Almer wrote: >> >> On 8/25/2022 2:34 PM, James Zern wrote: >>> On Thu, Aug 25, 2022 at 10:16 AM James Almer wrote: >>>> >>>> Signed-off-by: James Almer >>>> --- >>>> There doesn't seem to be any proper API to check if an encoder is open. >>>> >>> >>> true. >>> >>>> libavcodec/libaomenc.c | 3 ++- >>>> 1 file changed, 2 insertions(+), 1 deletion(-) >>>> >>> >>> lgtm. >> >> Will apply, thanks. >> >>> >>>> diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c >>>> index 485f554165..fb9a6ff8b2 100644 >>>> --- a/libavcodec/libaomenc.c >>>> +++ b/libavcodec/libaomenc.c >>>> @@ -400,7 +400,7 @@ static av_cold int aom_free(AVCodecContext *avctx) >>>> #if defined(AOM_CTRL_AV1E_GET_NUM_OPERATING_POINTS) && \ >>>> defined(AOM_CTRL_AV1E_GET_SEQ_LEVEL_IDX) && \ >>>> defined(AOM_CTRL_AV1E_GET_TARGET_SEQ_LEVEL_IDX) >>>> - if (!(avctx->flags & AV_CODEC_FLAG_PASS1)) { >>>> + if (ctx->encoder->iface && !(avctx->flags & AV_CODEC_FLAG_PASS1)) { > > I missed this, it should be 'ctx->encoder.iface'. Huh. When were those three defines above added? Guess they are not in any tagged release? Fixed in any case. Thanks. > >>> >>> This check is fine, though the codec control call should fail if iface is null. >>> >>>> int num_operating_points; >>>> int levels[32]; >>>> int target_levels[32]; >>>> @@ -1544,6 +1544,7 @@ FFCodec ff_libaom_av1_encoder = { >>>> FF_CODEC_ENCODE_CB(aom_encode), >>>> .close = aom_free, >>>> .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE | >>>> + FF_CODEC_CAP_INIT_CLEANUP | >>>> FF_CODEC_CAP_AUTO_THREADS, >>>> .defaults = defaults, >>>> .init_static_data = av1_init_static, >>>> -- >>>> 2.37.2 >>>> >>>> _______________________________________________ >>>> 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". >>> _______________________________________________ >>> 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". >> _______________________________________________ >> 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". > _______________________________________________ > 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". _______________________________________________ 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".