From patchwork Thu Jan 11 08:11:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rn_Heusipp?= X-Patchwork-Id: 7259 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.78.2 with SMTP id r2csp322457jaa; Thu, 11 Jan 2018 00:12:25 -0800 (PST) X-Google-Smtp-Source: ACJfBov01sIruKnGoTFK7hGmdSoqK6m47DXtmYL2QVnrN6TMttJ6763BH1R4ZVleerSQu/irsens X-Received: by 10.223.172.14 with SMTP id v14mr5393576wrc.249.1515658345090; Thu, 11 Jan 2018 00:12:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515658345; cv=none; d=google.com; s=arc-20160816; b=V3261t1biva88kkxz8d2k9k4dTvtqwWDxH3j7HUx3jyHokAhQ6D9FDfGyjtDTBUntO 2QGcGiP2tiwtPvEfrFTTfRImL+Q0DEyrGAMGZuWCSItJnnceugt09Q7m7bqzOd248tfG hsAXU11PHZ2lM59pR+H/3EcurMGFUxjHK0YsM+zH2LCPC6MHo2dKXYyPH2Qpyg19yHnO 8RMd65WWOhLXh3VU2x9fqXbm3nGR3SmchOBSmDo92bVFax95GZA95aSYCC8pMkvgx/B7 WNWg45H8cpz8AzdC+mmqg4gibN0mEucLHBm3n/JGcVmsqhl068Z1LwhcWp4y3lth4fBk 0DRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to:arc-authentication-results; bh=JPZXdOcSU27OU/Nrp/p8eRp6syjmHwQ51f3YKVTtGuE=; b=hJy94MiZJ+wvDvOtt+KAP81z0/MIJvYZ3hbkE5EJEpBSPvecEEUGLeV5gG/v+al8iD zV1jWxVFbWh1kBBhrjvOrG3JPp4OgXeZyOG09E00yUCQ1eW8TWQ7fdFrD13UirVttmcx s2EfPEamMC4rk7q2TW2ymb57t/SQr31eE9IfNQZRlpqUMfIUXofwTephvJqUbDuRmypc TBYV8SHOBTx9M4Qv4ty6TYgwAbx63+OFaEw0k39flhXhExweetnLNs0UtJnssBhgiUMg rfb+wFjOjFXLxpnjegYGc1EEBb9W+uwARassspTBCM5J+W0Ms/glppcZIzLCvKQ+2QXh H6Qw== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id x2si9177153wrc.347.2018.01.11.00.12.24; Thu, 11 Jan 2018 00:12:25 -0800 (PST) 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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A4263689F2A; Thu, 11 Jan 2018 10:12:10 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from datengang.de (datengang.de [138.201.179.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A178C689EDE for ; Thu, 11 Jan 2018 10:12:03 +0200 (EET) Received: from p5b3e6755.dip0.t-ipconnect.de ([91.62.103.85] helo=idefix.fritz.box) by datengang.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA256:128) (Exim 4.89) (envelope-from ) id 1eZXxV-0008RJ-Hq; Thu, 11 Jan 2018 09:11:36 +0100 From: =?UTF-8?q?J=C3=B6rn=20Heusipp?= To: ffmpeg-devel@ffmpeg.org Date: Thu, 11 Jan 2018 09:11:29 +0100 Message-Id: <1515658292-4719-1-git-send-email-osmanx@problemloesungsmaschine.de> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1515233228-16796-1-git-send-email-osmanx@problemloesungsmaschine.de> References: <1515233228-16796-1-git-send-email-osmanx@problemloesungsmaschine.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 91.62.103.85 X-SA-Exim-Mail-From: osmanx@problemloesungsmaschine.de X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on datengang.de X-Spam-Level: X-Spam-Status: No, score=-2.9 required=8.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on datengang.de) Subject: [FFmpeg-devel] [PATCH v3 1/4] avformat/libopenmpt: Fix mixed code and declarations 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" Signed-off-by: Jörn Heusipp --- libavformat/libopenmpt.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libavformat/libopenmpt.c b/libavformat/libopenmpt.c index af6eb1a..2e22290 100644 --- a/libavformat/libopenmpt.c +++ b/libavformat/libopenmpt.c @@ -72,13 +72,14 @@ static int read_header_openmpt(AVFormatContext *s) { AVStream *st; OpenMPTContext *openmpt = s->priv_data; - int64_t size = avio_size(s->pb); - if (size <= 0) - return AVERROR_INVALIDDATA; - char *buf = av_malloc(size); + int64_t size; + char *buf; int ret; - + size = avio_size(s->pb); + if (size <= 0) + return AVERROR_INVALIDDATA; + buf = av_malloc(size); if (!buf) return AVERROR(ENOMEM); size = avio_read(s->pb, buf, size);