From patchwork Thu Jun 16 19:55:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 36270 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:1a22:b0:84:42e0:ad30 with SMTP id cj34csp1128347pzb; Thu, 16 Jun 2022 13:05:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v7BMC8Qogf9GX0fSbxlONmyD0OnOi1Z/+bmWbhBgGsH66zGea9a163CSG0CwjrjLFl809g X-Received: by 2002:a05:6402:440f:b0:435:2e63:aca9 with SMTP id y15-20020a056402440f00b004352e63aca9mr6866893eda.162.1655409944472; Thu, 16 Jun 2022 13:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655409944; cv=none; d=google.com; s=arc-20160816; b=bbYqPommwt747YVKfK1ZCx008LOj/mih7yR8xCBkWH8OsmcUJWdlyhFI+wgO+qIXII bYCbeZGl3WGXLKADxZbI6wLsve9haqnnicJhPVMUV47iv6dNx/om55j83vgyLVzbWpMX qu2ua7viG1ikgFaH0lwym1rUgiA9tGaqHkkciIuQLWjZrtL/hs6bJyjgpRvl3XrlfS26 hoODvQavsDKgs1egRMZogxwo1vqoLyRUNiTmlIvsmqN3XhYQQ46ikOOWOzvV367cJ65t KSqrYHGEYoZ9qYiwQVoAP80BfS+QLiNcq3vvTjmROR5snq9HJsMoncklLDSFrOew48uQ 8wqw== 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=1l5b4vRTYCFj0v700ojwZJT14Ez0eJRMZrzK00LZ3C8=; b=s4XwYQEYkHZGKxyJk2AX6xL8hQ+zEL6PE6VwcmHQl+yJmhrP8xCfksmr4A3dHF+kwf F/a7QcpTZqiP48cDqQhsrfwCHPks1hIz0YWxEeIo0PdkDcbo5JVrkmHSU6IxJYdjF+kw 6mU9AjOcCmixSGwF2AgzJ1UTgJGfGWEYYchHz1CMACnOlRe+ZcDxHdei3d7myohjfaQX xkUK+1chJKIG7G9xJQ/yYd7cKo0dtp8iD9tNQEGI065M80yLhSHMuZcN6rVwN8esfHKi sukAR6w0suMboBwP0+5gAI7jFSEYGrAhWziRqIRWZcveAyZRT/3h9X9rg8FHNPP53q+8 gMWA== 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 b13-20020a056402350d00b0042d8ee7ada0si3669200edd.607.2022.06.16.13.05.43; Thu, 16 Jun 2022 13:05:44 -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 AE14968B89B; Thu, 16 Jun 2022 23:03:53 +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 15C0D68B7DD for ; Thu, 16 Jun 2022 23:03:40 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 10345240506 for ; Thu, 16 Jun 2022 22:03:37 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 6ptUqHxJZd-I for ; Thu, 16 Jun 2022 22:03:36 +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 B20F9240507 for ; Thu, 16 Jun 2022 22:03:33 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id A201B3A174A; Thu, 16 Jun 2022 22:03:30 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Thu, 16 Jun 2022 21:55:09 +0200 Message-Id: <20220616195534.5278-10-anton@khirnov.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220616195534.5278-1-anton@khirnov.net> References: <20220616195534.5278-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 10/35] fftools/ffmpeg: do not log to the muxer 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: AFNOhj8EAJE+ All other logging goes to NULL context. --- fftools/ffmpeg.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index d8ab0ffb9c..8f5901137b 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2905,7 +2905,6 @@ static void init_encoder_time_base(OutputStream *ost, AVRational default_time_ba { InputStream *ist = get_input_stream(ost); AVCodecContext *enc_ctx = ost->enc_ctx; - AVFormatContext *oc; if (ost->enc_timebase.num > 0) { enc_ctx->time_base = ost->enc_timebase; @@ -2918,8 +2917,9 @@ static void init_encoder_time_base(OutputStream *ost, AVRational default_time_ba return; } - oc = output_files[ost->file_index]->ctx; - av_log(oc, AV_LOG_WARNING, "Input stream data not available, using default time base\n"); + av_log(NULL, AV_LOG_WARNING, + "Input stream data for output stream #%d:%d not available, " + "using default time base\n", ost->file_index, ost->index); } enc_ctx->time_base = default_time_base; @@ -2931,7 +2931,6 @@ static int init_output_stream_encode(OutputStream *ost, AVFrame *frame) AVCodecContext *enc_ctx = ost->enc_ctx; AVCodecContext *dec_ctx = NULL; OutputFile *of = output_files[ost->file_index]; - AVFormatContext *oc = of->ctx; int ret; set_encoder_id(output_files[ost->file_index], ost); @@ -2994,7 +2993,7 @@ static int init_output_stream_encode(OutputStream *ost, AVFrame *frame) if ( av_q2d(enc_ctx->time_base) < 0.001 && ost->vsync_method != VSYNC_PASSTHROUGH && (ost->vsync_method == VSYNC_CFR || ost->vsync_method == VSYNC_VSCFR || (ost->vsync_method == VSYNC_AUTO && !(of->format->flags & AVFMT_VARIABLE_FPS)))){ - av_log(oc, AV_LOG_WARNING, "Frame rate very high for a muxer not efficiently supporting it.\n" + av_log(NULL, AV_LOG_WARNING, "Frame rate very high for a muxer not efficiently supporting it.\n" "Please consider specifying a lower framerate, a different muxer or " "setting vsync/fps_mode to vfr\n"); }