From patchwork Thu May 16 22:29:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 13169 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 7778D449AF9 for ; Fri, 17 May 2019 01:50:56 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5F337689DEA; Fri, 17 May 2019 01:50:56 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6449968999B for ; Fri, 17 May 2019 01:50:50 +0300 (EEST) Received: by mail-wr1-f66.google.com with SMTP id g12so4778237wro.8 for ; Thu, 16 May 2019 15:50:50 -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=5eQ/tklwXqTDjJqnVCyi1LuP/C4YpdfiqNOddfGxx/c=; b=gJ5rVrqISpt6M+IaNZybXMtQ5LXyLFXye3oAmgKceINu3guWQrann8pWUeAwhVfrbB e2MZbQYHKKWiAy4or5rLVYH9MZshjihjj/xbfqro6vz2kIIDyNR9mPJf8bggaqtxzKXz OSi3rDobL+DdmtKn9Jq8t6CO9b8vh9SKuuhWUQR/tyPiNL7mTj791QaoifT1gFG51HNI 5zdV697czhCCOol3nMpPmNXs0+A1kDhR3i+FYRvj3YsPVvEjsuDIxsxoCOpST5jYOtQq GVhhoQV+56YobklB7nz/v1FtOtNdoht3bT24tj7Ph+Hcv+ymE4YRy8jWMBL/zS1y8FRQ 5d+w== 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=5eQ/tklwXqTDjJqnVCyi1LuP/C4YpdfiqNOddfGxx/c=; b=HXz/Zz40QB9YmI4Cl/gOBTiYz6hGF02aTlnDsutXWPg/ZhEXz/auKroHnIp2ZPzy8Q Po9Oy+Iwvy9oaDAwRWsiNEr8JsWjcpfMO8BxT8fjDZ5Ps8AsTJxP5/UmMPtULSSiJeuf Z64UfvS2lhxzXxVKEmTD62wuBbidS8eXNXIn3kkxzmkndf5WlEeZsMOlYPioNkoua643 4JvlE3za0uLCMLvRPz5APVQfI2xNK+UNV/qpCbMjZSoHSU2oa7sSCGFTeT72B2gC8Iac hMEVqdBm53aXncg/Ux9bGxh2krSlNnOST8gzDLhdDI+DQ4hlI70+gC0UmmWmPGWxeDUH Cs2Q== X-Gm-Message-State: APjAAAWgB03zRWO1A2I06PNNKvf/ZU6uh2RJXCDbJtac+6NHP+Icl+vL c7RysIQXhx97HM7njX7JSTxYJiLr X-Google-Smtp-Source: APXvYqyO7ZkHjUUGWPB8vAddjzUb7f2neMjgfjT/Kj7i8kzrnbbUAZNOIDoXRnWTHmwfwhymHuvCBw== X-Received: by 2002:adf:ecc2:: with SMTP id s2mr26258423wro.258.1558046583975; Thu, 16 May 2019 15:43:03 -0700 (PDT) Received: from localhost.localdomain (ipbcc18715.dynamic.kabel-deutschland.de. [188.193.135.21]) by smtp.gmail.com with ESMTPSA id i185sm11168725wmg.32.2019.05.16.15.43.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 May 2019 15:43:03 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 17 May 2019 00:29:47 +0200 Message-Id: <20190516223018.30827-4-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190516223018.30827-1-andreas.rheinhardt@gmail.com> References: <20190516223018.30827-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 03/37] avformat/matroskadec: Compactify structure 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" Matroska EBML IDs can be only four bytes long maximally, so it is natural to use uint32_t for them. By doing this and rearranging the elements of the MatroskaLevel1Element structure, one can reduce the size of said structure. Notice that this field is not read via the generic reading process for EBML_UINT, so one is not forced to use an uint64_t for it. Signed-off-by: Andreas Rheinhardt --- libavformat/matroskadec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 6da9b15d79..3b8ddc5ecb 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -310,8 +310,8 @@ typedef struct MatroskaCluster { } MatroskaCluster; typedef struct MatroskaLevel1Element { - uint64_t id; uint64_t pos; + uint32_t id; int parsed; } MatroskaLevel1Element;