From patchwork Wed Aug 3 13:58:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 37100 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp457627pzb; Wed, 3 Aug 2022 06:59:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vMxnyHKIeZErRJnYxBBr1GY4bUyhLp+0xkrzV14RU1d+kq+TZibrDky3XG8WUVWJ0eKmY9 X-Received: by 2002:aa7:d0c8:0:b0:43c:f071:992a with SMTP id u8-20020aa7d0c8000000b0043cf071992amr25914815edo.418.1659535169519; Wed, 03 Aug 2022 06:59:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659535169; cv=none; d=google.com; s=arc-20160816; b=RkK3lH9qyN1oraiO8pMSLr7SQHGHM9jEH4x/BkXnLIwpelQgWaVVSRegbe3qIx7Fnn wVYGIAMDREHSXSfsCpxG8UzUUyBdApqoz+91EoUXmN08/9KlobHOokff1HfCX1fxxdnO LO9E8H+8PqnH49pXSBT4SA8wAPEOaADHWeHJIATl6Pj1w+A+iKQ0y7gi5YPmdPc77qtm 0Vxb+/zsM/kexo0CadRrjj8uYcE57lkN3dtthwPseUp9VtCKhe5IB0cEw/5XBVmZOnzP +ZfqOVTcXPy/R5Bgb88b4wBHw5Ozow3zXeIfN/zbSecNGDFMx0lUgVrPe04xqp2Tg7R+ bwsQ== 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:delivered-to; bh=FA/K4RxuTtKHEuoEA0vasgw+g6imeuvFeWtJK7apnTk=; b=QFiPo7dgI5cNkVf6RnuG/eR0zsQjZzqtOQ6wJMJXW62ztZrb0jqhDDZPoWED9L8OxF 1A4zQZ42kPQfQVhmKQ04xstfjQ8WIhMzUbGaJh+XSrZOM2hphVi0+7hefcr4Kygomoxg bARCfGfJVH4UGe59gKYyd+rniT5nLWDsFCpS6KbezDy4kC4hgftbu9w8rSSLF01ArUYL yaQV7WCMPxfcgKfPj5/ISdz/V92/zE6k+pKArbEuncwsfRJ5HF0/8qf+MEgWj5dc1o0r bL1hWu6eRtO+1tF6kqr60MqwZPMv77s5aJuYh5zj984wWq5+/oZCcMG9SN8saHZS2j24 EKmA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gr19-20020a170906e2d300b00718d2d8bfbfsi4717730ejb.316.2022.08.03.06.59.29; Wed, 03 Aug 2022 06:59:29 -0700 (PDT) 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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7854B68B82E; Wed, 3 Aug 2022 16:59:05 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9837968B4DC for ; Wed, 3 Aug 2022 16:58:56 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 33CE624017E for ; Wed, 3 Aug 2022 15:58:56 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 66QcMH4jy6Qd for ; Wed, 3 Aug 2022 15:58:54 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 96BE8240179 for ; Wed, 3 Aug 2022 15:58:54 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id E9E153A041D; Wed, 3 Aug 2022 15:58:51 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Wed, 3 Aug 2022 15:58:23 +0200 Message-Id: <20220803135844.16662-4-anton@khirnov.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220803135844.16662-1-anton@khirnov.net> References: <20220803135844.16662-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 04/25] fftools/ffmpeg_hw: stop logging to the decoder context 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: PlPtFdHwPDxw Only the decoder itself should do that. Use NULL as is done by all other logging code in ffmpeg. --- fftools/ffmpeg_hw.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg_hw.c b/fftools/ffmpeg_hw.c index 14e702bd92..8acfeaf08f 100644 --- a/fftools/ffmpeg_hw.c +++ b/fftools/ffmpeg_hw.c @@ -339,7 +339,7 @@ int hw_device_setup_for_decode(InputStream *ist) if (ist->hwaccel_id == HWACCEL_AUTO) { ist->hwaccel_device_type = dev->type; } else if (ist->hwaccel_device_type != dev->type) { - av_log(ist->dec_ctx, AV_LOG_ERROR, "Invalid hwaccel device " + av_log(NULL, AV_LOG_ERROR, "Invalid hwaccel device " "specified for decoder: device %s of type %s is not " "usable with hwaccel %s.\n", dev->name, av_hwdevice_get_type_name(dev->type), @@ -390,7 +390,7 @@ int hw_device_setup_for_decode(InputStream *ist) type = config->device_type; dev = hw_device_get_by_type(type); if (dev) { - av_log(ist->dec_ctx, AV_LOG_INFO, "Using auto " + av_log(NULL, AV_LOG_INFO, "Using auto " "hwaccel type %s with existing device %s.\n", av_hwdevice_get_type_name(type), dev->name); } @@ -408,12 +408,12 @@ int hw_device_setup_for_decode(InputStream *ist) continue; } if (ist->hwaccel_device) { - av_log(ist->dec_ctx, AV_LOG_INFO, "Using auto " + av_log(NULL, AV_LOG_INFO, "Using auto " "hwaccel type %s with new device created " "from %s.\n", av_hwdevice_get_type_name(type), ist->hwaccel_device); } else { - av_log(ist->dec_ctx, AV_LOG_INFO, "Using auto " + av_log(NULL, AV_LOG_INFO, "Using auto " "hwaccel type %s with new default device.\n", av_hwdevice_get_type_name(type)); } @@ -421,7 +421,7 @@ int hw_device_setup_for_decode(InputStream *ist) if (dev) { ist->hwaccel_device_type = type; } else { - av_log(ist->dec_ctx, AV_LOG_INFO, "Auto hwaccel " + av_log(NULL, AV_LOG_INFO, "Auto hwaccel " "disabled: no device found.\n"); ist->hwaccel_id = HWACCEL_NONE; return 0; @@ -429,7 +429,7 @@ int hw_device_setup_for_decode(InputStream *ist) } if (!dev) { - av_log(ist->dec_ctx, AV_LOG_ERROR, "No device available " + av_log(NULL, AV_LOG_ERROR, "No device available " "for decoder: device type %s needed for codec %s.\n", av_hwdevice_get_type_name(type), ist->dec->name); return err;