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 19B9D43BB8 for ; Thu, 21 Jul 2022 23:40:38 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 50CEA68B6E9; Fri, 22 Jul 2022 02:39:59 +0300 (EEST) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E0B9A68B6CB for ; Fri, 22 Jul 2022 02:39:50 +0300 (EEST) Received: by mail-pj1-f53.google.com with SMTP id p6-20020a17090a680600b001f2267a1c84so5029487pjj.5 for ; Thu, 21 Jul 2022 16:39:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:message-id:in-reply-to:references:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=LiwY9esjylXEwphM8sKD7BmHNam7jJI8KTt+HXBYNik=; b=Kow1SEBNB4mMS+H8LGS6ZP24cubcPEP8GsLAR8SojbkPapkmJ9YICHsEgztdEX3ch6 T6mXCNihDFycLFkrU1lPlfjrT638L7Oj5E/eAQvhJ+pi/K68b7Fgc3YZ6IWWOk8Pwld8 4wu5sqqEVPZnutjBffx3Xia2lPzOjNdqIwYkQSwVUClGQEykA4jh0EcPUXS8rWPvWXqv q018SfCOjmj1r/bQtJJ31y5gdME2jO/ILCVvAcA29nzaTnmB5c4JBaj818eEcynSstcs K6I7pvqH1Ytb2O/wwxDOJkeNFdhg7vLrADijc95hUUJk4Z9m1XVXlh/f1KJR01OvtSdI z3iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:in-reply-to:references:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=LiwY9esjylXEwphM8sKD7BmHNam7jJI8KTt+HXBYNik=; b=nJ6wWQ+78rSYzx//c3L56NEVjf8xGhTsSSGzH95R9G/xe264lrD6HCZISGWUEkaRIn Rcj60kOzZnbKLNyC7QW/srw/i98CShvaIox7iwgH9sivApv/WXTOrPIxajvKeXYb1HtI zcuA/zfjGufWaoaXEhFFQJbDyGRKp3UuInWwXePSGFsItpIoz+QCrqD/rVHX+IGxL9I8 /lP4fu9xtxzqhBwpUxsqj4fENsvE1mmiEDDc3XMJVAAyXZC0gw2s0wlbqDebmzfr/TMN Ubx6kn5kmIl6ZuTLW5zJPLvuAxmM2jwvtMvFKvUXFY2L92UJ1TTq3eq1zzWbj/o3l49/ ZuqA== X-Gm-Message-State: AJIora+NKVFxufYxwfXh93pmDJuoV61yo5UKpnDyy1sLIeSMHWI6Qeg6 U4sAG0hhZPMyMhw9tZ5ZlHKbkVCjc0g= X-Google-Smtp-Source: AGRyM1tjr8iYMmBI8r7x+nWOUja8ZXV6ri/5Q8UD8FmKmSA7Y2JF2hMqfu+sHjal1iCwiElH8Y26mw== X-Received: by 2002:a17:90a:e4ca:b0:1f2:32e3:e13e with SMTP id e10-20020a17090ae4ca00b001f232e3e13emr887485pju.103.1658446788755; Thu, 21 Jul 2022 16:39:48 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id v4-20020a17090a960400b001f004ba93b1sm1977524pjo.27.2022.07.21.16.39.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jul 2022 16:39:48 -0700 (PDT) From: softworkz X-Google-Original-From: softworkz Message-Id: <7ee28b7c25ac6aeb0567b036c24d7d3bea3b733a.1658446783.git.ffmpegagent@gmail.com> In-Reply-To: References: Date: Thu, 21 Jul 2022 23:39:43 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v3 4/4] avfilter/hwmap, hwupload: use new av_hwdevice_ctx_get_or_create_derived method 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: Mark Thompson , softworkz 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: From: softworkz Signed-off-by: softworkz --- libavfilter/vf_hwmap.c | 4 ++-- libavfilter/vf_hwupload.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_hwmap.c b/libavfilter/vf_hwmap.c index 2e03dfc1fe..b79cf6732c 100644 --- a/libavfilter/vf_hwmap.c +++ b/libavfilter/vf_hwmap.c @@ -82,8 +82,8 @@ static int hwmap_config_output(AVFilterLink *outlink) goto fail; } - err = av_hwdevice_ctx_create_derived(&device, type, - hwfc->device_ref, 0); + err = av_hwdevice_ctx_get_or_create_derived(&device, type, + hwfc->device_ref, 0); if (err < 0) { av_log(avctx, AV_LOG_ERROR, "Failed to created derived " "device context: %d.\n", err); diff --git a/libavfilter/vf_hwupload.c b/libavfilter/vf_hwupload.c index dbc41734cc..41ee0e43c4 100644 --- a/libavfilter/vf_hwupload.c +++ b/libavfilter/vf_hwupload.c @@ -51,7 +51,7 @@ static int hwupload_query_formats(AVFilterContext *avctx) /* We already have a specified device. */ } else if (avctx->hw_device_ctx) { if (ctx->device_type) { - err = av_hwdevice_ctx_create_derived( + err = av_hwdevice_ctx_get_or_create_derived( &ctx->hwdevice_ref, av_hwdevice_find_type_by_name(ctx->device_type), avctx->hw_device_ctx, 0); -- ffmpeg-codebot _______________________________________________ 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".