From patchwork Tue Oct 15 11:17:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 15767 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 D74F444771B for ; Tue, 15 Oct 2019 14:33:51 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B954A68A1C3; Tue, 15 Oct 2019 14:33:51 +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 670C7689A5F for ; Tue, 15 Oct 2019 14:33:45 +0300 (EEST) Received: by mail-wm1-f68.google.com with SMTP id p7so20483809wmp.4 for ; Tue, 15 Oct 2019 04:33:45 -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=TssiF18zjBele3UbsEAefADtrZCAT7sK6InxE3R5UKY=; b=Vsk3oQibd7O3tzUatv8cwAYzizw0GzBAykOS1Kdr8thm2hgszrg5FjwDbZgONm7w5r 25+yPOL8+UsAznmECJat3i4I4SsAkSaovgvichWZ6SKQv0P+O2qXkhUCVLwmKt0uNodw Z0WX/eylVbLcKDj00uzwWdjyxGHYkV1jyWXY72wgmp/t5maYISHWXQ5R5FGv/s2QgpiZ tMebY5GmhLUOX9HpTVB/n3ib1vbijgXSk+pFwMjF0UQRbTEy6YIQsDJ1AkYQTnf0RsY/ RkUN1IFwn/DwS5uZMhSkJU8IWpU+8rEw/EsgpJdAFFPk0B5sWxprgaFlAzTiWUWtYd+x LOWw== 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=TssiF18zjBele3UbsEAefADtrZCAT7sK6InxE3R5UKY=; b=cpQbkwSb4XfrrtZd3XStVgm1iGrLjuyb7AhNE1PpVjgpKv2amCpamDIO+piBkRA7nq cfHAL0U/0HpdSjJVD+36i9G9F8uBd+TGs55drrSK/ib/kh5RZxhWT2k2Xgp/J301loe6 wZ6xFvjk/ttkX65wKqOZCGUfiR+27yUSO5Wbyahu48TT0la3SFDb8gJUfMtS3VYtz59y 1ZeEyvdNqLlWhCB5La/12ro6tP/TXDsj/f7zVAHCTVbpHHXYxAxU0WRko/Nd6VBvkWXE /zywWwCqn7OO2czKZK8BY+jaGZX/K+vqZptonJekLV3wW24wvO9kMHzgNBrEFTNyuJuv K1bg== X-Gm-Message-State: APjAAAUslm37rcdvLQfAqQlGYyzVOn2ozC4MEBnsCtfry4QY+Hzhvsv6 yFHQgt40iMBRUs/rgETm5CrqcuHV X-Google-Smtp-Source: APXvYqw30Z2xcs3UPxN4PoJuBmtmYQCC+PuLnawFN72/grxdVze6GYFUa1FLZS0QwGcz7p/r7Gj18g== X-Received: by 2002:a05:600c:2503:: with SMTP id d3mr3410529wma.44.1571138734688; Tue, 15 Oct 2019 04:25:34 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc08937.dynamic.kabel-deutschland.de. [188.192.137.55]) by smtp.gmail.com with ESMTPSA id y3sm4364637wmg.2.2019.10.15.04.25.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2019 04:25:33 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 15 Oct 2019 13:17:31 +0200 Message-Id: <20191015111737.14246-3-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191015111737.14246-1-andreas.rheinhardt@gmail.com> References: <20191015111737.14246-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/9] avformat/matroskaenc: Use smaller types 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" Several members of structures denote offsets inside dynamic buffers and therefore always fit into an int. So it is unnecessary to use an int64_t for them. Signed-off-by: Andreas Rheinhardt --- libavformat/matroskaenc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 63ad6e47b4..e024c58c84 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -95,11 +95,11 @@ typedef struct mkv_track { int write_dts; int has_cue; int sample_rate; - int64_t sample_rate_offset; + int sample_rate_offset; int64_t last_timestamp; int64_t duration; - int64_t duration_offset; - int64_t codecpriv_offset; + int duration_offset; + int codecpriv_offset; int64_t ts_offset; } mkv_track; @@ -134,7 +134,7 @@ typedef struct MatroskaMuxContext { AVIOContext *cluster_bc; int64_t cluster_pos; ///< file offset of the current cluster int64_t cluster_pts; - int64_t duration_offset; + int duration_offset; int64_t duration; mkv_seekhead *seekhead; mkv_cues *cues;