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 A3E394256F for ; Wed, 5 Jan 2022 03:19:37 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 741E068A990; Wed, 5 Jan 2022 05:19:35 +0200 (EET) Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C2B65689CA7 for ; Wed, 5 Jan 2022 05:19:29 +0200 (EET) Received: by mail-qk1-f173.google.com with SMTP id de30so37028189qkb.0 for ; Tue, 04 Jan 2022 19:19:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=DHmo6/30ofSeOxS08OD9NcIdfkZHDTDcKVs/J6pQOJ4=; b=XWdaTCI4bFjmjmv730LFtT+muZWKRUsDXxdraKuQBnFAk6wTpvgsdNimzxMi3oOMr2 oHNFe8bRrixDbod2GAIo+Hu3XmIX6690oNSKwSu2KgdVycEOJFOWJ08SG2Bn2tmuyRic otuBz90Q1m9VARWFdI71TX0lehgi/q5QhHBLzg4/QEmpBnYIDynAMe+nJTyrJNYVAhCr gD+Hql3YOC6dnn56hF+BZGV2XZ2j1NQakJo+76r+25Rg+PoFd7SRjwkTaC7/WnnAE0cN dnjsu5C/6ai2sFAaljuZeVE1ds8JhfI5GI1UQJ6lw/7jdj2HR9DQU6Y5WIynR8p8zZ3o /wxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=DHmo6/30ofSeOxS08OD9NcIdfkZHDTDcKVs/J6pQOJ4=; b=GdEg+DAOe7Ngf0h/irDVjkjewIQgHaOGpvhxNPtzjhSZtmT5XRWgl1aFsVj6rvx4pN 3LBPTMyMLjebfov65vN4lrNNjtxJbZLmEei9RxOOGAZkMFXqL9Zhzx7/OFzJmxb5EHlQ ej+PTnFX/klm1qtYfYwgetCFIBKDTdW3+/hFpO5nNS6GykYuKv1TZeqVn5X5PdWx0rNs qAHm724emwIrZp9F+XZwLcLKP1faPovlENWFS1f7/y+xEYEQqEK0Wb3xdsWDfjx9ykE/ 2qq3OOOUPLb7bWbLP0eE8wqF8+GgDw7ZW8RE+E4VNYPMNyFaeLEaD3NS/xIPGPZJJXUd Bt1g== X-Gm-Message-State: AOAM5307GZJfaJ/k/C4Gm0QG3QmUj2gT0jbnoEKPkytmt0GNO9JjsKR2 jp1C/iEw2HuQruqnuUjpTLaO5wyUR1w= X-Google-Smtp-Source: ABdhPJwlsmc6HiId92opavSjmGuXs1Lnyz6M7IkJ1lrmyMNLr23MKWwIUh3U82E7pVhMIoT0fNC1tg== X-Received: by 2002:a05:620a:4628:: with SMTP id br40mr37485233qkb.519.1641352767868; Tue, 04 Jan 2022 19:19:27 -0800 (PST) Received: from [192.168.0.13] ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id bs16sm33574020qkb.45.2022.01.04.19.19.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Jan 2022 19:19:27 -0800 (PST) Message-ID: <1379ae9c-d8f9-7e32-260f-eff79ac1cfd7@gmail.com> Date: Wed, 5 Jan 2022 00:19:25 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <163785839519.25323.16303122737288435026@lain.red.khirnov.net> <163794332023.25323.7446601680884381987@lain.red.khirnov.net> <163795393240.7822.9483345286843818669@lain.red.khirnov.net> <50841f8a73c902d3fca896b1eda923d082b27383.camel@intel.com> <6c1f517dad96d2d6075cb69a30e1a50aefd3feb9.camel@intel.com> From: James Almer In-Reply-To: <6c1f517dad96d2d6075cb69a30e1a50aefd3feb9.camel@intel.com> Subject: Re: [FFmpeg-devel] [PATCH v4 1/1] avutils/hwcontext: When deriving a hwdevice, search for existing device in both directions 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 12/27/2021 12:08 AM, Xiang, Haihao wrote: > On Thu, 2021-12-23 at 14:01 +0000, Xiang, Haihao wrote: >> On Fri, 2021-11-26 at 19:29 +0000, Soft Works wrote: >>>> -----Original Message----- >>>> From: ffmpeg-devel On Behalf Of Anton >>>> Khirnov >>>> Sent: Friday, November 26, 2021 8:12 PM >>>> To: FFmpeg development discussions and patches >>>> Subject: Re: [FFmpeg-devel] [PATCH v4 1/1] avutils/hwcontext: When >>>> deriving >>>> a >>>> hwdevice, search for existing device in both directions >>>> >>>> Quoting Soft Works (2021-11-26 19:43:58) >>>>> Maybe I'm missing something, but hw device contexts are refcounted. >>>>> What happens in hwdevice_ctx_free() is this: >>>>> >>>>> av_buffer_unref(&ctx->internal->source_device); >>>> >>>> IIUC this only happens after the parent device is freed. My concern is >>>> the following situation: >>>> - the caller creates a parent hwdevice >>>> - the caller derives a child from it, which may acquire some additional >>>> resources beyond what the parent holds >>>> - the caller unrefs all his references to the child, but the child does >>>> not get freed because the parent still holds a reference to it >>>> >>>> Since av_hwdevice_ctx_create_derived() has a flags parameter, we might >>>> want to introduce a flag to control this behavior. >>> >>> I understand what you mean. I'm just not sure whether a practical case >>> with such a requirement exists. Should that turn out to be required, >>> such flag can be added at any time, IMO. >> >> >> I agree we may add such flag later if required. May we merge this patch to fix >> the annoying derivation limitation if no other concern ? > > Any other comment for this patch version? I'll add the note pointed out by Lynne > and push this patch if no objection. > > Thanks > Haihao Why was this pushed? There were objections. _______________________________________________ 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".