From patchwork Sat Jun 3 23:38:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 3824 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.10.2 with SMTP id 2csp776136vsk; Sat, 3 Jun 2017 16:38:23 -0700 (PDT) X-Received: by 10.28.165.80 with SMTP id o77mr3642844wme.109.1496533103526; Sat, 03 Jun 2017 16:38:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496533103; cv=none; d=google.com; s=arc-20160816; b=c3oh1MtZ8+ehiOXD1J6Qs3A2A/J7YA16RLoNN2s8pt5iEUdongw4TtefNlCRvwKFw6 wwWQlC+W/OazRJj54kZBX+7gU3pwnHb7HYh3OrzHYQielJDd77WTehO7CIYbtjs5LV6/ QuVNe3UjxLA72+jMwj1dRpX/kFFnDNVU5+V4v8oeGFQg4EM8Um+oS6RGnWWCdwWg4BDY zuCWHZ5uD4hscXiopw9LBbkA5u0XBjEq7woy+nu7h/EHCRUtIwmK8TDN3Mf1AsZlxhjy LxWVC5Vlp75yKEVPw2Uw7EfTwHl24FLrPOm4i9d3vvEVcLDljolmt5X4lx2Ij+K1+Gis yNmQ== 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:message-id:date:to:from:delivered-to :arc-authentication-results; bh=ZVIin5LJ6bsQ35L7T1TH+aQlm1aMWQyBIjOonjVzJEA=; b=rMAFrcZGbm34ByD9qUNzRfr+VGQWGb83I0QfWrvhU4s8wUGrCg3Y+NIjYbTzipMLTQ /HxloCYx9lxYT55aFtjog9aZxz5y3PeRxxSJ/gLz0BdDQNHaUGxYKtezQot9JnIfi0su YTi0Rh5XIIH8Jl962kmEmbDji7+d/C1OBQUvkszo24ePhDBTDx9YwRch32q1G4fQpbWC 9lyisngn35zi2tyh5WXqomutE8023RP+CNc3YSxAS4z2Di7enloe/IZQkz8cZghNWRcg Soj5usKZhfMRG9DO5sd0OJclcFztiYNShN443TXPDe5geskRcYNm9c/Ee08qGx3zHdQV /+XA== 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 e12si5045282wmi.119.2017.06.03.16.38.22; Sat, 03 Jun 2017 16:38:23 -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 4D3F0689C85; Sun, 4 Jun 2017 02:38:13 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe03-1.mx.upcmail.net (vie01a-dmta-pe03-1.mx.upcmail.net [62.179.121.160]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DBEF2689BE7 for ; Sun, 4 Jun 2017 02:38:06 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe03.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1dHIcW-0008Rd-BV for ffmpeg-devel@ffmpeg.org; Sun, 04 Jun 2017 01:38:12 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id UPe31v0180S5wYM01Pe5QZ; Sun, 04 Jun 2017 01:38:05 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 4 Jun 2017 01:38:02 +0200 Message-Id: <20170603233803.17416-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.13.0 Subject: [FFmpeg-devel] [PATCH 1/2] avformat/options: Remove one special case 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" This simplifies the code and reduces clutter. Signed-off-by: Michael Niedermayer --- libavformat/options.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/options.c b/libavformat/options.c index 9371c72667..d6d589a0b0 100644 --- a/libavformat/options.c +++ b/libavformat/options.c @@ -105,8 +105,7 @@ static int io_open_default(AVFormatContext *s, AVIOContext **pb, int loglevel; if (!strcmp(url, s->filename) || - s->iformat && !strcmp(s->iformat->name, "image2") || - s->oformat && !strcmp(s->oformat->name, "image2") + !strcmp(s->iformat ? s->iformat->name : s->oformat->name, "image2") ) { loglevel = AV_LOG_DEBUG; } else