From patchwork Sun Apr 15 22:03:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 8456 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.1.85 with SMTP id c82csp184781jad; Sun, 15 Apr 2018 15:09:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/ett0PX+JgnPRzzVB7XknMDoFWxZ1+EBKd2CxPirblRH3TES8VcUohNyPSmPV9bpUoehbT X-Received: by 10.223.144.227 with SMTP id i90mr9015414wri.100.1523830169500; Sun, 15 Apr 2018 15:09:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523830169; cv=none; d=google.com; s=arc-20160816; b=tiOsu+DikUClvkRZss3C6/RMf9lgLraWmVgEEfMjOrVROL6GI3nhuxpapJEPylBz8a WdBYAkqIxa/JeYWGOhh6E2oBxWhaz1QsZ0J0Ymuz4m/tvCGCxP5Rja7BoDu3cPmV2bmG C5AeQd0k2ySpd2d+G+IMcl7037sDX8FaC1fS4sA6mViTMeu0orO9C4HfAAZu8QhZlP3R uBEsB44zckGL/myJ7KodLkPGFiAjbFBIHZ4U+ngEuq5P+t/9J6MNdqVtQXXsc68Hqnah 1orV7+P2yPqf3jiggRagiU5o69qkSuJflUu2AW4SZjCRsphX/61T4xpmIEtZbypDnNta iBIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:mime-version:dkim-signature:delivered-to :arc-authentication-results; bh=glbdWbMl9Gq93I/M8CIyxqUwZVDFPmHrGf6Wfqtcr9I=; b=g+gtJvgQ2sAFtjx/AI/zyQqSeaPYXl25pwEhKvKmjoUsxGxM35MS/hvGbwBp7LTt87 Pp/kVuDz4GquPK14raqRWMiyKYDceWwIuCN/GLXyYtOmpODycLhboHrsEx/VteLNzQGg htib11iilFIykic6eOeBAJy2SbKKnmKE297o1h7Lksd4nbckhjZoV//BEvFESi2uDGPG W0ZiIerqqrCrGFqzp3IOenaAKFExYmxts6k/eqjoXZ8tw+yJYFJQdDsF8qXeo8WT71rl tFAGnUQVDTLRqLsqeuD12mfHRwyR8yS7AE8cSF8hrTJwc1DmVFy0ogalh34iWD6mAhwG GTUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=svW/BfGd; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id j26si2869765wrd.401.2018.04.15.15.09.29; Sun, 15 Apr 2018 15:09:29 -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 header.s=20161025 header.b=svW/BfGd; 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=QUARANTINE 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 43352689CA0; Mon, 16 Apr 2018 01:09:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-it0-f49.google.com (mail-it0-f49.google.com [209.85.214.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4289468035B for ; Mon, 16 Apr 2018 01:08:55 +0300 (EEST) Received: by mail-it0-f49.google.com with SMTP id n81-v6so2589136ita.1 for ; Sun, 15 Apr 2018 15:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=VguDl+cdt/1WVc89Q4dF8abl8Xl14nsyuwnr1/3zcYY=; b=svW/BfGdn9eUkUhiDuJxZWlWHdVqMdpnrAtj/qrT+BO/pcYLJ/hOCaBDfi4QwvI70y b61BJuREix8jEFxrCdlk6Eq7wcaEaPjp3kwUm620FKFE4P4gEwLHrjf2LUSCg1xWiluL nojTHLNruKIWUQ7v6Qe7zs9uyi1KHb69Ci5+LlG/oHhLBcgSaCDsF4J/d7UBUo/CIYQM QcRK07ejqKfo7aLtI/3rclc10LmFugsQYqo9r3BcxDoJgVYwjTpFdBfBNJjxYJVfQjuB z25TEJqZYQMR/cZJqfTjiL+7lhEC07bSQdLDWdw/jekIZL9RKkezUm+9eAsDNeN8ROEC nlSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=VguDl+cdt/1WVc89Q4dF8abl8Xl14nsyuwnr1/3zcYY=; b=Ldg52Q6RHmRf3dLGXtHhta/XCWBGcHYzgGJ+IOyZw68TedT2OBIU8lP7XzaGi67fe4 jfKAeQZRSQSYKI+CZNVl11izN/N7qda2Q7ucVLIwo+yyuI4Ak++8Y7iFG2dnNA/wczOA X4knSB9ouDzHCW0InnQewKgkyy6bIW80omuPQIk9E5L9KqMADXxjQK6Ya61Jy31DOohD nHm4yT6xrr4hJZ3pSTMbTNLz4OS8m3qtSQ+e7xmRDNXjLGZs3JCbgUXVFpQ6fH9pzaP1 BZO1yPurEAMSLl3A+Z6MZAGcauSEqk1m/suKpcOpsUlQS+aKsZrAz1uOkcgmunb4xrTB l9GQ== X-Gm-Message-State: ALQs6tDZoJRU7oFV9zsXRALwijnwizuegdyj2I786ioGaeCWWP9YEAnw Y+zXJclRbFQTs02xuSVl1gVcdCLpbTR49pmqwyM= X-Received: by 2002:a24:1d94:: with SMTP id 142-v6mr13943234itj.39.1523829830527; Sun, 15 Apr 2018 15:03:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.3.78 with HTTP; Sun, 15 Apr 2018 15:03:49 -0700 (PDT) From: Carl Eugen Hoyos Date: Mon, 16 Apr 2018 00:03:49 +0200 Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH]lavd/vfwcap: Pass pointers to int instead of long to av_parse_video_size(). 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" Hi! Attached patch is supposed to silence a user-reported warning, I cannot currently test. libavdevice/vfwcap.c: In function 'vfw_read_header': libavdevice/vfwcap.c:331:35: warning: passing argument 1 of 'av_parse_video_size' from incompatible pointer type [-Wincompatible-pointer-types] ret = av_parse_video_size(&bi->bmiHeader.biWidth, &bi->bmiHeader.biHeight, ctx->video_size); ^ Please review, Carl Eugen From 5ef8c3562cc06786c492ba8bc04ff69f91cb3176 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sun, 15 Apr 2018 23:40:19 +0200 Subject: [PATCH] lavd/vfwcap: Pass pointers to int instead of long to av_parse_video_size(). Fixes the following warnings: libavdevice/vfwcap.c:331:35: warning: passing argument 1 of 'av_parse_video_size' from incompatible pointer type libavdevice/vfwcap.c:331:59: warning: passing argument 2 of 'av_parse_video_size' from incompatible pointer type --- libavdevice/vfwcap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c index 6a923d9..e2ab276 100644 --- a/libavdevice/vfwcap.c +++ b/libavdevice/vfwcap.c @@ -328,11 +328,14 @@ static int vfw_read_header(AVFormatContext *s) } if (ctx->video_size) { - ret = av_parse_video_size(&bi->bmiHeader.biWidth, &bi->bmiHeader.biHeight, ctx->video_size); + int w, h; + ret = av_parse_video_size(&w, &h, ctx->video_size); if (ret < 0) { av_log(s, AV_LOG_ERROR, "Couldn't parse video size.\n"); goto fail; } + bi->bmiHeader.biWidth = w; + bi->bmiHeader.biHeight = h; } if (0) { -- 1.7.10.4