From patchwork Mon Apr 13 22:11:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 18932 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 9042144A3FE for ; Tue, 14 Apr 2020 01:12:34 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7A70768B94A; Tue, 14 Apr 2020 01:12:34 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9EE6268B7DD for ; Tue, 14 Apr 2020 01:12:26 +0300 (EEST) Received: by mail-wm1-f68.google.com with SMTP id h2so10849352wmb.4 for ; Mon, 13 Apr 2020 15:12:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gnS7/AGzLWL/n18YmzADDM7JG/lT5qIcoGSFSQKf4Ew=; b=d5v0zNPQ+67OKgu/wDLiZVdamEyscpcx63iIjQ2JWKZ18bLUpVIYVyYVHTRa0Ecw+T +oqcMR1TNmLExsJlRl+d5RijtJeUxtHJQMq4vHfeZ/v/Z2KTPWLC1v/uScWTMfVhyTyg 4k00GNrV3tbq/zM0CYUOGCpe+k26cozqCU0hohPEkoSWykqk75i/xhlFjOM5vo3rQ0VA kbnjUD7fvvWD5KIb5jQfoATQ1dxlLqbifOdHz6n4b448T2J3YY6+KTia4vsPi4cGvAcU 9m122gl30PU9xzB4RrrUgjdfYKBGPDZzsYGZ1fVxLkPGvAmEFwByNyM4aV9mmZHyE8+L f9fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gnS7/AGzLWL/n18YmzADDM7JG/lT5qIcoGSFSQKf4Ew=; b=e2lMZS6k1w04TsfGEtg4/d16j3BBBjQN1vt1n7yrlDI+u2gFH9WsfCryxnUmXcLZ1Q 1Io9vZWxMuqPXA+Gv/yKCeu2D+OTzEnKF325RUXfC4Lkq8mw/FLfyssrBRzEsok9T7J1 QKuDkJ7tqHevlvOjU9d0cI0Ql0350cl1dk9suRKBLVupFgoM4dP2GLdFgDO/SdKY4E8G 4xIh/EFCrviSGFvDc6Pnu3/gwKpKBxxKAGQt3faqDrzpIQMWoVDHb0I0DviFEvtAWyQ6 U8K5cSeHO0YujWSpLdCO8DtDkd+cYqbbPpNkC6OmvA6gZ4ukYDn7EW/G5Zf9MVpYQE5M f2xQ== X-Gm-Message-State: AGi0PuZ5eAHwhb2jlDgPdoCxwcjgfTYwma9ENC9lm9mNdKo5bt05Si0R A8bZGuy7Nj+jw3BtukXd9HFG4vl0 X-Google-Smtp-Source: APiQypJ4O2H5p8hL1AgIGN/w00YzaFHPsJ5/BgOL3GDfCYLHEZKK+7AjvD91OStQNH/nfBrWakC7Eg== X-Received: by 2002:a1c:a553:: with SMTP id o80mr19784304wme.159.1586815945872; Mon, 13 Apr 2020 15:12:25 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1ab57.dynamic.kabel-deutschland.de. [188.193.171.87]) by smtp.gmail.com with ESMTPSA id h16sm17930804wrw.36.2020.04.13.15.12.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Apr 2020 15:12:25 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 14 Apr 2020 00:11:56 +0200 Message-Id: <20200413221156.20179-4-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200413221156.20179-1-andreas.rheinhardt@gmail.com> References: <20200413221156.20179-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/4] avformat/matroskadec: Remove redundant setting of chapter titles 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Chapter titles are added to the chapter's metadata since 6cb6e159, yet since 012867f0 (the predecessor of) avpriv_new_chapter() already adds the title to the chapter's metadata. So setting it again in matroskadec.c is redundant and expensive. Signed-off-by: Andreas Rheinhardt --- libavformat/matroskadec.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index c699ce66b8..761d8b3743 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2933,10 +2933,6 @@ static int matroska_read_header(AVFormatContext *s) (AVRational) { 1, 1000000000 }, chapters[i].start, chapters[i].end, chapters[i].title); - if (chapters[i].chapter) { - av_dict_set(&chapters[i].chapter->metadata, - "title", chapters[i].title, 0); - } max_start = chapters[i].start; }