From patchwork Tue Mar 14 22:02:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vittorio Giovara X-Patchwork-Id: 2929 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.50.79 with SMTP id y76csp31176vsy; Tue, 14 Mar 2017 15:10:32 -0700 (PDT) X-Received: by 10.223.173.199 with SMTP id w65mr34853567wrc.125.1489529432750; Tue, 14 Mar 2017 15:10:32 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 90si6701133wrg.187.2017.03.14.15.10.32; Tue, 14 Mar 2017 15:10:32 -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; dkim=neutral (body hash did not verify) header.i=@gmail.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 30B05680CE0; Wed, 15 Mar 2017 00:10:13 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk0-f194.google.com (mail-qk0-f194.google.com [209.85.220.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2C5C5680465 for ; Wed, 15 Mar 2017 00:10:06 +0200 (EET) Received: by mail-qk0-f194.google.com with SMTP id v127so542740qkb.1 for ; Tue, 14 Mar 2017 15:10:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=9KJesLwnIvudIBLY4CzzJyS35kLYWBLsEPc4mxJAfz4=; b=KVtJJ0mOamNFQRUXXYoAvwWIgZEvBrkh6e3Tci2rOlM70irY3dGzGir+TwDbTyc1vI r+RHggsffLmG15Iwi3bcIxEYJUGccwm6+XFVYsahhbPILkkwsG9WLrdw4LMw7dqW3U6N IXuVBVxJAHC8fFUEiBNx2VaWPWn52KefBVIuXb/cJP8d5mTQGZuthBSZhWRt5AkUyfN2 laaF4yLiOb53tkObcxpdhmGEDVPT4COzlH36RvafJgq4NoQlHQhhYpxLkDxxauomzGBY taWXUHS6OM7ududJzVEAUBw6kJM92bEy8tuxhjHeYWVr+UQdTf2hi8aPZZnCYRgIRTKr 7iUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=9KJesLwnIvudIBLY4CzzJyS35kLYWBLsEPc4mxJAfz4=; b=DYYlcbfQSOMOWOz70W2f47u3spxYrJVj06NiefhaHSVm4GG0I+OlWQ3SLXZszCOorw NAvQq/DW5PWPn7VVx9B01vZj8RHqEj4kBJVauFCQio7hoLXylnG58THqFClTRp8xOYw+ WDpOEojo/G4YD4XIx5tc8bi8JEAQSpMjACSXG2lFbG27ZRQ4nWgDgGNv/IF3AsuOjSEn AyavU7M6AwG2t4YyN10ZJ47tmCHEdiHtiqdrc41Vhvm+8WH1LU8TRNmKkwC0wACWwDeK Ii/H62RXEj+5C8UEbO5yvv4lKiBW3L+u03otTP+onCFEPVaSluqetkXV/kFNgd0iMuKF FJpw== X-Gm-Message-State: AFeK/H2918wk/CmSRvtbuyPgrqhJA8e6cFzulKIy2TaDRcmMBAWoH8AUPY1I0qkovONXmA== X-Received: by 10.55.113.133 with SMTP id m127mr38492191qkc.112.1489528922904; Tue, 14 Mar 2017 15:02:02 -0700 (PDT) Received: from vimacbookpro.vimeows.com ([8.40.92.161]) by smtp.gmail.com with ESMTPSA id 29sm15290954qtn.51.2017.03.14.15.02.01 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 14 Mar 2017 15:02:02 -0700 (PDT) From: Vittorio Giovara To: ffmpeg-devel@ffmpeg.org Date: Tue, 14 Mar 2017 18:02:01 -0400 Message-Id: <20170314220201.10148-1-vittorio.giovara@gmail.com> X-Mailer: git-send-email 2.12.0 Subject: [FFmpeg-devel] [PATCH] spherical: Change types of bounding and pad to uint32_t 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" These types better reflect the ones described in the specification and avoid any platform-specific implementation issues. Signed-off-by: Vittorio Giovara --- libavformat/dump.c | 2 +- libavutil/spherical.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libavformat/dump.c b/libavformat/dump.c index 7514aee7ac..c56895628d 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -339,7 +339,7 @@ static void dump_spherical(void *ctx, AVCodecParameters *par, AVPacketSideData * &l, &t, &r, &b); av_log(ctx, AV_LOG_INFO, "[%zu, %zu, %zu, %zu] ", l, t, r, b); } else if (spherical->projection == AV_SPHERICAL_CUBEMAP) { - av_log(ctx, AV_LOG_INFO, "[pad %zu] ", spherical->padding); + av_log(ctx, AV_LOG_INFO, "[pad %"PRIu32"] ", spherical->padding); } } diff --git a/libavutil/spherical.h b/libavutil/spherical.h index e7fc1d69fb..fd662cf676 100644 --- a/libavutil/spherical.h +++ b/libavutil/spherical.h @@ -164,10 +164,10 @@ typedef struct AVSphericalMapping { * projection type (@ref AV_SPHERICAL_EQUIRECTANGULAR_TILE), * and should be ignored in all other cases. */ - size_t bound_left; ///< Distance from the left edge - size_t bound_top; ///< Distance from the top edge - size_t bound_right; ///< Distance from the right edge - size_t bound_bottom; ///< Distance from the bottom edge + uint32_t bound_left; ///< Distance from the left edge + uint32_t bound_top; ///< Distance from the top edge + uint32_t bound_right; ///< Distance from the right edge + uint32_t bound_bottom; ///< Distance from the bottom edge /** * @} */ @@ -179,7 +179,7 @@ typedef struct AVSphericalMapping { * (@ref AV_SPHERICAL_CUBEMAP), and should be ignored in all other * cases. */ - size_t padding; + uint32_t padding; } AVSphericalMapping; /**