From patchwork Mon Nov 22 21:58:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ridley Combs X-Patchwork-Id: 31586 Delivered-To: andriy.gelman@gmail.com Received: by 2002:ab0:6957:0:0:0:0:0 with SMTP id c23csp7338109uas; Mon, 22 Nov 2021 13:59:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJxe3gqQB3UPVl/riS/Abi/UtAi1S5A9FtRbgH6MOlZ0PF9WFMs21oY04eX+QU254vgmnn3q X-Received: by 2002:a17:907:90c3:: with SMTP id gk3mr765766ejb.282.1637618374197; Mon, 22 Nov 2021 13:59:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637618374; cv=none; d=google.com; s=arc-20160816; b=Ib77Kha6+cVfQ5dddz7pHWnMETiOAMEDpBeaIVDbSW8Dqdf2MzsTd6513Iw6EhuSpz M9UJSXFl22vjEtJcAX+xbXTebpzqUChm5PbS9kdJAOUJJk7IU1xt2jafKsULWkmjvFgF AlmCIbSnczFUrwHZkxf2UW1YCN4Amg8h0zMpLIehLYoQwkhwIEDi74iwRvIRs30LGmK5 oWUqh6WoHUd+70InGBRWgZIPS4A0Bv48NmEJT9HGwZm4IFF7tNaHEbumHW8EWdvXaISU xjDStOyfmBVxTn2DqlAkQlrEvfH1kwLBpScje5Y6Y478lkXp1vPkOX01OAawJWydsmjb XuGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=dsEL+SK0n+DD7XGaqlhWP+AfjLTVjJ2xdgQOdrLv50k=; b=RZeFowRrnhGFXCJg1bXcI51iOFU4xbWvU0qDxieXwJ4wQIwv8anVk7Mry+Wldc0A33 ptKMyNYAVmUgKdtM2SuMo6QARWVxJR+VbfJWPYfx+G4q1QwmVq4yTS5keVU/NnWrXm1s cha442ITGx20684UlyDl32vvZigh+G4DQjWU0EsdxQyTV4++DOESGjOz547pvYYd8xQS MtPNE95uCAD+bxbJv0CEcvR7Wy0c0ROcCJaJdCe0IeCLAZekx8fFdpwOAIyxO0/7cMLq G80QzXs/rF0f6TXnZffLUMah5RcJOEoiuQV7x+ATfOAVVMkd2cPohcRpHeWj7cf422ic Z0Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b=asIlmE1l; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gq2si19499819ejb.516.2021.11.22.13.59.33; Mon, 22 Nov 2021 13:59:34 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b=asIlmE1l; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 67F0868AE12; Mon, 22 Nov 2021 23:58:44 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-il1-f181.google.com (mail-il1-f181.google.com [209.85.166.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ABF9168AD86 for ; Mon, 22 Nov 2021 23:58:37 +0200 (EET) Received: by mail-il1-f181.google.com with SMTP id k1so19633061ilo.7 for ; Mon, 22 Nov 2021 13:58:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rcombs.me; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=WvQEEhkrtvyP/10de+H1WF6OnE/jl72H/QufzAqlh6A=; b=asIlmE1lcVXRcupEq5Ti8M0vnZTImjR7bMyj7uAjF+lFAOKx6Hih6Enw49PUPapJFm 06F3c5D6pBkwKilewQ7U/SQby6zqf4XGEheU8gW0FyQmdeXB77vYtepBV3oaGcsYc4pP YQDVjeXIKvcmX7eyJU5nx4bY9s4yiftmz2KO5u0DczvX4x18DosP5D800yQkQPKK89Bs VxCsK/lCmeLVX1Qy7G0Qp1oXip7PwSfUCVt8OvmV+AvoEcqn2udgactqEIiFqBQgpyph d0C0KPE+tl+Ir8vAUn5lO2APPkWmr6LchB6Jk3HQB/M0Mm6RzoT3hCTXNO3h4yqqCdT0 e9mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WvQEEhkrtvyP/10de+H1WF6OnE/jl72H/QufzAqlh6A=; b=muIWWnQYndZBxzRrmlQ6VJWsaJQoS4FJsFDzxlMZz40gq8LGUpuPS+wHvNMoPf3zVc Cdpd1aTp8lljjcUF51EqNHYCannp63r+scPQORQ7horfhXHpr77KkN2deXHJa9ifscok jJDzJh9/MwZH48u2Knrdk4jfXHbZ0UBoevzHWRU1GAG/n7qmmzCjbVzPqmGL+hHcNQtr ITJeRov2b17LNB3iJs50EYtiJ49tdlDr2uHvtr+FSm2lfb6QB3TFwDdPAodGbxz9a8le Kjz38CFd4iVhpwjitSIdv5rtKPeO0Pnoaf8SSiUNE96AF5CDJxgMo6YDCyRPJSWr034n tN6A== X-Gm-Message-State: AOAM532GHEPdP4qL6vZman48BZMuefDWBHavKDavX7d1nIzfVBoPw9V7 zgQLy147bNBecwECof+gI9ZvkIZgsNbhmk0= X-Received: by 2002:a92:da0f:: with SMTP id z15mr198099ilm.151.1637618316096; Mon, 22 Nov 2021 13:58:36 -0800 (PST) Received: from rcombs-mbp.localdomain ([2601:243:2000:5ac:edf5:499:2479:42a8]) by smtp.gmail.com with ESMTPSA id o1sm5668802ilj.41.2021.11.22.13.58.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Nov 2021 13:58:35 -0800 (PST) From: rcombs To: ffmpeg-devel@ffmpeg.org Date: Mon, 22 Nov 2021 15:58:11 -0600 Message-Id: <20211122215821.9849-6-rcombs@rcombs.me> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211122215821.9849-1-rcombs@rcombs.me> References: <20211122215821.9849-1-rcombs@rcombs.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 06/16] lavc/videotoolbox: fix format computation 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Zwd0vsch3VvV Content-Length: 1012 Use sw_pix_fmt instead of pix_fmt (consistent with other hwaccels) --- libavcodec/videotoolbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index bd6e769207..010f553e57 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -1059,7 +1059,7 @@ static int videotoolbox_uninit(AVCodecContext *avctx) } static enum AVPixelFormat videotoolbox_best_pixel_format(AVCodecContext *avctx) { - const AVPixFmtDescriptor *descriptor = av_pix_fmt_desc_get(avctx->pix_fmt); + const AVPixFmtDescriptor *descriptor = av_pix_fmt_desc_get(avctx->sw_pix_fmt); if (!descriptor) return AV_PIX_FMT_NV12; // same as av_videotoolbox_alloc_context()