From patchwork Sat Jun 3 23:38:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 3825 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.10.2 with SMTP id 2csp776164vsk; Sat, 3 Jun 2017 16:38:31 -0700 (PDT) X-Received: by 10.223.148.97 with SMTP id 88mr8757310wrq.137.1496533111652; Sat, 03 Jun 2017 16:38:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496533111; cv=none; d=google.com; s=arc-20160816; b=GBbTkYulTc+E/N7Gb6omgiq4UPKaOnxR3IGMLCkMNEsZlMDc7SN9JdmVXt2Zh0StLY ypPovGquCHSRD1zqsIrj46N38NyGyOS/lKc8s7MecR/0VLCEUJYZxgGYLyD6w7yGmbbt AMnzd0ayKljPraRIc8q3J6DQF3TEd+JWENpV3hwbXh3x0JN831Jg+UggM57obxR2gLHT w6QdXLu5FQiTr6xJ9uFsCVVS/oWzjT+UyabSg62iSRv6H1yJhJelqEnXnQZgYRu9xUVx 3w5WNQlgXU+Qql9b0sTvYXmqEsviBU5CyU+HKyEugHS8J8WN7+8zoHXOLvkJ569e14Lx FWtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to:arc-authentication-results; bh=g5gcTZSgeN+bD4x3Br1MBi72bJrvB2hLq22zDH9xvmI=; b=bJWbPHzrXNfJU/1XZmLAnQfpKGasm1jhUB5H+qaNKIBDpKjE3TPDNccx7GrYXE7taw sTFRRe2I8dnXmyKxt4WD7MqrRlH4LT9/EHzg1Nujy7wkWrtwE0agQzSpL/SCiAvi/Q9S GyKILAPsuy9eDcRSmTYHKc44oNx5BpkLD8tcYde2t8bMwb5KcCfa2WuyHT/oDOVx9CKc uzoaTHOspWj3+rIvPbtHXP4na5O2+TpYzWpsUpK6DoY3WEcb6mLs1xA4t06adiUPb+ty xZQdf8UbTr3pM1ye3a1JMiquHiGzxGZGD+ZuGFwDAcaqh6IcxV9kUvrVy53W6C83/o/A 9qMQ== 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 o83si7107002wmo.57.2017.06.03.16.38.31; Sat, 03 Jun 2017 16:38:31 -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 B480E689D31; Sun, 4 Jun 2017 02:38:15 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe05-1.mx.upcmail.net (vie01a-dmta-pe08-1.mx.upcmail.net [84.116.36.20]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 307C7689D07 for ; Sun, 4 Jun 2017 02:38:09 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe08.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1dHIcY-0007JY-Ei for ffmpeg-devel@ffmpeg.org; Sun, 04 Jun 2017 01:38:14 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id UPe51v00g0S5wYM01Pe6Qo; Sun, 04 Jun 2017 01:38:06 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 4 Jun 2017 01:38:03 +0200 Message-Id: <20170603233803.17416-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170603233803.17416-1-michael@niedermayer.cc> References: <20170603233803.17416-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 2/2] avformat/options: Simplify loglevel initialization in io_open_default() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Michael Niedermayer --- libavformat/options.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libavformat/options.c b/libavformat/options.c index d6d589a0b0..16e3886e4b 100644 --- a/libavformat/options.c +++ b/libavformat/options.c @@ -102,14 +102,11 @@ static const AVClass av_format_context_class = { static int io_open_default(AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options) { - int loglevel; + int loglevel = AV_LOG_INFO; if (!strcmp(url, s->filename) || - !strcmp(s->iformat ? s->iformat->name : s->oformat->name, "image2") - ) { + !strcmp(s->iformat ? s->iformat->name : s->oformat->name, "image2")) loglevel = AV_LOG_DEBUG; - } else - loglevel = AV_LOG_INFO; av_log(s, loglevel, "Opening \'%s\' for %s\n", url, flags & AVIO_FLAG_WRITE ? "writing" : "reading");