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 71C5D45C91 for ; Sun, 2 Apr 2023 19:06:47 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C760668BE3F; Sun, 2 Apr 2023 22:06:44 +0300 (EEST) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8158868BDFF for ; Sun, 2 Apr 2023 22:06:38 +0300 (EEST) Received: by mail-ed1-f42.google.com with SMTP id t10so109003527edd.12 for ; Sun, 02 Apr 2023 12:06:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680462397; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=W/r8QrN5AsYKb7ZWOIxhwOHgl8x4FT6X8wLhsqQrvNg=; b=gF2SoWr1W1AWy2OThiVCPcUDVVqbnORzQlfN/huWDSNQco2eCes3/JaFic/R2SfJQA E43/C84ZFC2Rv3bBXaJg6KmaQqyAbcYPIavYzT2snm11uTDoR+acrrQMip6gM8P98D0O aeAXv83RFrjTeQKMocrcYwUZXP3JX8EXDov6YYfg9w00rQxqwvzJwsBhTEBUrpqpmWr8 VobbpAYWGyMKa5BUj/CNZB5Yw7SDxnwN+b/KQjvD9agbjdstYygVdn885VgcPaC8YSbz Z1NSwRHzINO0UF0ixOGYtH/DCSvaQGRghAM/9yCZhCre7PcsjK9b1zfBUR0m3z8902Uh CVsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680462397; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=W/r8QrN5AsYKb7ZWOIxhwOHgl8x4FT6X8wLhsqQrvNg=; b=M+JwTEVdeUxUG+/Uou5GXE+5AEiBy0MIIoz/st0mKcOEc/HLHK99+yKlI9ZuyKaxu7 N1QVo4vByV79HX+H7ifTcr9cwerKyd8sAb/6QccDQdREkmIxEYC2UI+QV3wWi+C0oFvm 7WkwIX3MERV4GGBW7gk/8p5+NutMlIdSVMjCRqlnNac2DU3CMRlCgxqYBLX8adLdWDMq oe9o1dPRgscz95E4db8Taag2dMjGUM+0BP/sCBu1hgKkoQz/bl/ZGm4VbbmxCI9Rr/5I vfH8tvdZzd43WX5MXC9X1zgO2Tq7FlSV6TbRBChGF0wjM5UDi0D08PXrnH3sKeELzahO qGjg== X-Gm-Message-State: AAQBX9dBhEbzUsFxIMAH02OszQkdAdXD+fHAf1TCPBCMUehFFkGojHn7 QsEFoGCutczbw59IvgzV2tqg4ZT57C8= X-Google-Smtp-Source: AKy350a5CfMeMsq9gJWZNyfNU4b0oFQ+t9CrTmPY0pw1Lomk3IUhdI00Bgeor4Ykll6gy7HiNh0pkQ== X-Received: by 2002:a17:906:ee8b:b0:93e:8791:7d8e with SMTP id wt11-20020a170906ee8b00b0093e87917d8emr24468816ejb.2.1680462397362; Sun, 02 Apr 2023 12:06:37 -0700 (PDT) Received: from mariano (dynamic-adsl-62-10-98-143.clienti.tiscali.it. [62.10.98.143]) by smtp.gmail.com with ESMTPSA id d20-20020a170906c21400b00947792df079sm3497970ejz.115.2023.04.02.12.06.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Apr 2023 12:06:36 -0700 (PDT) Received: by mariano (Postfix, from userid 1000) id 1A6A8BFB73; Sun, 2 Apr 2023 21:06:35 +0200 (CEST) Date: Sun, 2 Apr 2023 21:06:35 +0200 From: Stefano Sabatini To: FFmpeg development discussions and patches Message-ID: <20230402190635.GJ3542@mariano> Mail-Followup-To: FFmpeg development discussions and patches References: <20230330093809.22687-1-anton@khirnov.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230330093809.22687-1-anton@khirnov.net> User-Agent: Mutt/1.13.2 (2019-12-18) Subject: Re: [FFmpeg-devel] [PATCH 1/2] lavf: fall back to a more meaningful log instance name 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 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: On date Thursday 2023-03-30 11:38:07 +0200, Anton Khirnov wrote: > An uninitialized AVFormatContext instance with neither iformat nor > oformat set will currently log as 'NULL', which is confusing and > unhelpful. Print 'AVFormatContext' instead, which provides more > information. > > This happens e.g. if choosing an output format fails in > avformat_alloc_output_context2(). > --- > libavformat/options.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/options.c b/libavformat/options.c > index 22ad523b2d..e4a3aceed0 100644 > --- a/libavformat/options.c > +++ b/libavformat/options.c > @@ -44,7 +44,7 @@ static const char* format_to_name(void* ptr) > AVFormatContext* fc = (AVFormatContext*) ptr; > if(fc->iformat) return fc->iformat->name; > else if(fc->oformat) return fc->oformat->name; > - else return "NULL"; > + else return fc->av_class->class_name; > } Do you have an example to show? Anyway LGTM. _______________________________________________ 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".