From patchwork Tue Dec 10 21:59:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 16713 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 E424B44A835 for ; Wed, 11 Dec 2019 00:00:42 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CFF8C68B562; Wed, 11 Dec 2019 00:00:42 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 23A7668B43D for ; Wed, 11 Dec 2019 00:00:31 +0200 (EET) Received: by mail-wm1-f65.google.com with SMTP id t14so4864525wmi.5 for ; Tue, 10 Dec 2019 14:00:31 -0800 (PST) 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=3qPTZFWUXoUTGoELWyYjoqtpsG5qhUcCdwKynKEQ9so=; b=fQs5QvCkWBKD3ZzsiOk58afGXmRxNnkaXznc6UrrmiGrYslsWwcfp93AVxQ4cu+0fk 8rJbAxWE8k9Y4WSK0LutHToaHXKIu5uG2LhKVn2zPLfO+Xxnmb3goz7NYpbA0VZllcop 3eEpj/d4BvbIt8d75ieQjj02fP0/6lJEQijAS6zImTvjWSpnFB8n32US05PReA2uCYN8 nfvfdlxTtd3JA/Ui87ChUXfoI9HUw0LnYuNCMZiAGJHEwq/jgFgswcM2is4DN+S0W612 nqDIFEf0Gl3JzU7ImJA7+mu7vCueXG15mGHYijZwp5ZdA2wlrKZ8f6R5khvuVY6vN2S5 ns4w== 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=3qPTZFWUXoUTGoELWyYjoqtpsG5qhUcCdwKynKEQ9so=; b=epjJQVitmBBhjRxEme7GPM87QaHSUeqYp1JD5UE22+Ni7/X35l5M6mrWSaXeshIown wy+QfgnF8FaRTPqMemZExCGf3ggmZ5A6sz1Ju587CubNfRfNwIBSHY4UFA+6DlPXPYSY LdMdg2YhzCyNR1LuuOhDNM98uxk7XNSs3ZA2VyGLdys9tuH7L7Tc8x0ybD/FQgA0lIzs OrZqSCrXF51agS/XXSkiK6qoCnoa8aRuvlPp2N22mSirH4bJq7Ed/xleRpb/mYAXTB9S QCz6LSbMdpCyLpEQXA8bsg+Q4KsXTdstJVGz1HyKaLP7jtDuOryUYXhTha0AaghxhdTn C4LQ== X-Gm-Message-State: APjAAAXCQBU/XWat2BgfWYd/LwES4Bl/HrmnOpsM58wLMGGFufwtatu2 ywLPjxZc9+StMK0AzrKoLXkRo4lP X-Google-Smtp-Source: APXvYqyg/ohX9n8IXsdvrMW6AZ+rTzjNuYOXULz3i8MBgOwhh3s+tnKXuDGTMzKozBnndig2XQpGrw== X-Received: by 2002:a05:600c:24ce:: with SMTP id 14mr7799333wmu.122.1576015230441; Tue, 10 Dec 2019 14:00:30 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc08e23.dynamic.kabel-deutschland.de. [188.192.142.35]) by smtp.gmail.com with ESMTPSA id n129sm3876381wmb.1.2019.12.10.14.00.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2019 14:00:29 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Dec 2019 22:59:50 +0100 Message-Id: <20191210215955.11178-6-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191210215955.11178-1-andreas.rheinhardt@gmail.com> References: <20191210215955.11178-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 06/11] avformat/rtpdec_xiph: Don't add padding twice 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" ff_alloc_extradata already adds padding to extradata. Signed-off-by: Andreas Rheinhardt --- libavformat/rtpdec_xiph.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavformat/rtpdec_xiph.c b/libavformat/rtpdec_xiph.c index 574508affb..1bd48fa562 100644 --- a/libavformat/rtpdec_xiph.c +++ b/libavformat/rtpdec_xiph.c @@ -260,9 +260,8 @@ parse_packed_headers(AVFormatContext *s, /* allocate extra space: * -- length/255 +2 for xiphlacing - * -- one for the '2' marker - * -- AV_INPUT_BUFFER_PADDING_SIZE required */ - extradata_alloc = length + length/255 + 3 + AV_INPUT_BUFFER_PADDING_SIZE; + * -- one for the '2' marker */ + extradata_alloc = length + length / 255 + 3; if (ff_alloc_extradata(par, extradata_alloc)) { av_log(s, AV_LOG_ERROR, "Out of memory\n");