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 4D83F42BD3 for ; Sat, 30 Apr 2022 20:08:19 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D619768B2C7; Sat, 30 Apr 2022 23:07:55 +0300 (EEST) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AFD3B68B30A for ; Sat, 30 Apr 2022 23:07:48 +0300 (EEST) Received: by mail-pf1-f176.google.com with SMTP id z16so9525965pfh.3 for ; Sat, 30 Apr 2022 13:07:48 -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=INpjQNRkTPbWy0wNCq4w1f1LPuqtxLkpQ2Z1Bnl1/+GI0zwO29+aAUkfQVZDrYom7Q HBErj+v9IvmpMBNs+naZOSN0oL1G2UrT5BiXE/oNdWMr0bODlWCJcb9SylPECqBXHmPA UvCtMEUWlAjTckgCao7DqheXTDuUjLt5hl9PIpnJT1zlswiOFCKP9/Q+dd2W0q2ZDcFt g/OZpe9gdl2gBvVWFILhR/ycS0cu/MjrUxSnR5fw9r8KhfWA8znPoyFn8nG6/PT55DBa xnZl8KKSLyWjoQqDlhAe07FSqLY2UhFb50Efdv8PMwW4jN27s30Nx0ZZihWRpWHjCc/a kbdw== 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=A3wqtF/Q2t13M+vbehiLlmHiH0tGCGPIk1sSZ7wDavB/JgjEWrK4iXKeevjDt2Uc+l HBvCNuwo8o/yrSqsfNMQdvKLx5EUuYcsOv5U1gNd8cgvCqIUhNlPhwIEBBLY+ZHwKCvy q9eLAqUSGdmrcu3RSq1h7GPMFzCQCKz8s93UDQYNkg63xMrwbzZH3AT+FqDo6ewe7Sdv VP9PgsDYCWWAEedHB+bBnjFAysP6PMuGJXuFCXnIysDnIO+EqmAbWiO+x6ZUEfdkOyiW 4DfNtAkI9pomUkW2hyIaczoLJOoF+rE3gZxAk/TUuFyDRVCfFiOJ0xLyYoGySGvvncz0 lZ1Q== X-Gm-Message-State: AOAM5320PMWEhzWcApgYGrotmcHAUgaVxhcXjw/bK8tqya+9n61MfcVv oQt2lps6owQIOEguqJYvZKiYvHMQoktxyA== X-Google-Smtp-Source: ABdhPJzv8bxopUhUdkWEVZpmlhEQ6ZH6WfpER97yqJnLMKT/wIVSo6j/jAkSi1ANt2qPN+Co4z28uA== X-Received: by 2002:a63:f156:0:b0:3ab:ada6:b463 with SMTP id o22-20020a63f156000000b003abada6b463mr4048084pgk.462.1651349267070; Sat, 30 Apr 2022 13:07:47 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id k1-20020a63ff01000000b003c14af505f5sm8300805pgi.13.2022.04.30.13.07.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Apr 2022 13:07:46 -0700 (PDT) From: softworkz X-Google-Original-From: softworkz Message-Id: <023597a557377e17820a530405f799021064a7fa.1651349262.git.ffmpegagent@gmail.com> In-Reply-To: References: Date: Sat, 30 Apr 2022 20:07:42 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 3/3] 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: 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".