From patchwork Wed Sep 19 16:05:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 10417 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:12c4:0:0:0:0:0 with SMTP id 65-v6csp875312jap; Wed, 19 Sep 2018 09:07:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZHsTv0ufZZQr/JGexk/Wkyt2MyfY2OlFDIMZCok/C61k4UtCw744R5uL8lmdEFro5O81uk X-Received: by 2002:a1c:a745:: with SMTP id q66-v6mr1659036wme.49.1537373244219; Wed, 19 Sep 2018 09:07:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537373244; cv=none; d=google.com; s=arc-20160816; b=WtDBXpwyMM3/98V8x03H1ZPuqGJmrIVlk2xhnd9NnkOFICkCiX+lakdFrnJBR4Rg/h Ud7fR6SjXC4Lsy2zlLH+BQWiP0JCG7Hsrrjd1AHXkEJCZ13n1+yEFkyRtHijuJGrXNN2 b/8l0Ue6dP0KCXSt6fnEnce+anUJEJSIOdbYjZ28pRAXAEpQmyWh3NAdIjwy6NaB3qFO C9DRAqrZz9YYkAv1xIgKAJ3X5YTjmbOuzGxwaJTQAvvbi4FptTrtw6huoUcfQ+13gFHF bDms2cLfxaLy+YNI4U1Bqlw6c1tPuUx4kkrvY0Z+/nnsCmp1V4gThtKhAMirf/EpeZKV Wvwg== 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=OnhW9G7zBwPTZvHwMYpa2twYiqeDt98jd9uvSVDnVd0=; b=nmA6ygJkRyuzyE8CmHU8SOYE4MRRErVuI0V4adigQGANPLPuKmLMv5qr7aIH0ctVGu dfTU1uTXhxQDxBi2VQU1HdRqcMGHdCiDY2OmS6vtyGrZL/Wyhd+VFHl8nzJFRYQMya4J h4nWlbHMXr/EMd7cYimcwmfdL5iWRj+X51Nx4Lg/JPywuUURigKiSzdak0ZhR+gAmGc7 CwMRyI8dwBLkuVkJFNjCf1ipBSTZQfAo6MkePyJ9S6RBDVV51lvtAxwgKgCbbAT5zNNI +4tpAKpzpyydxT4Y18dKHYQ8HidKUC3bPFWl9DrRoVGHlZq1aMt6z+OR0/nItfkZndff h/Qg== 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 125-v6si5323073wmc.197.2018.09.19.09.07.23; Wed, 19 Sep 2018 09:07:24 -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 C3DBC68A687; Wed, 19 Sep 2018 19:06:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-qmta-pe01-1.mx.upcmail.net (vie01a-qmta-pe01-1.mx.upcmail.net [62.179.121.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DEDD968A617 for ; Wed, 19 Sep 2018 19:06:17 +0300 (EEST) Received: from [172.31.218.40] (helo=vie01a-dmta-pe04-1.mx.upcmail.net) by vie01a-pqmta-pe01.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1g2ezn-0007Vj-9g for ffmpeg-devel@ffmpeg.org; Wed, 19 Sep 2018 18:06:31 +0200 Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe04.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1g2ezi-0002w2-1V for ffmpeg-devel@ffmpeg.org; Wed, 19 Sep 2018 18:06:26 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id dU6H1y01t0S5wYM01U6JiH; Wed, 19 Sep 2018 18:06:18 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 19 Sep 2018 18:05:25 +0200 Message-Id: <20180919160532.25760-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180919160532.25760-1-michael@niedermayer.cc> References: <20180919160532.25760-1-michael@niedermayer.cc> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 03/10] avformat/movenc: Remove unneeded variable from mov_find_codec_tag() 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Michael Niedermayer --- libavformat/movenc.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 6b9c012bc6..33978ee1b0 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1611,8 +1611,6 @@ static unsigned int validate_codec_tag(const AVCodecTag *const *tags, static unsigned int mov_find_codec_tag(AVFormatContext *s, MOVTrack *track) { - unsigned int tag; - if (is_cover_image(track->st)) return ff_codec_get_tag(codec_cover_image_tags, track->par->codec_id); @@ -1623,12 +1621,11 @@ static unsigned int mov_find_codec_tag(AVFormatContext *s, MOVTrack *track) av_log(s, AV_LOG_WARNING, "Warning, extension is not .m4a nor .m4v " "Quicktime/Ipod might not play the file\n"); - if (track->mode == MODE_MOV) - tag = mov_get_codec_tag(s, track); - else - tag = validate_codec_tag(s->oformat->codec_tag, track->par->codec_tag, - track->par->codec_id); - return tag; + if (track->mode == MODE_MOV) { + return mov_get_codec_tag(s, track); + } else + return validate_codec_tag(s->oformat->codec_tag, track->par->codec_tag, + track->par->codec_id); } /** Write uuid atom.