From patchwork Sat May 6 09:20:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas George X-Patchwork-Id: 3593 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.3.129 with SMTP id 123csp34663vsd; Sat, 6 May 2017 02:20:35 -0700 (PDT) X-Received: by 10.223.136.75 with SMTP id e11mr35090822wre.14.1494062434953; Sat, 06 May 2017 02:20:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494062434; cv=none; d=google.com; s=arc-20160816; b=cfz4cj8wjUVnKyUhq07IYgrj4P9FqNd1Tydyyjq0MVnQldUED2l6yoDbHVf3ObLgap pbod3fQtQGHVsWWuF+VMRVT7FV10LTheZxFmudMW1b+MlwKnb0fnyQQ3N7t97vXGVnoe ePHNeEsO+Jz63N/K20jCSweq+d1aNDJPwj+vVAqHwSxpk4gb69oyTfGiDa1s+ZUVTnPD +d4tno+7ooa5ejTv6Qi+yowpXjsRmPFVtdsrRRSBiZfZeJJy+wrPI8ZIU/wB0FspZZ6u jENajKJh1JcGbX3+/BodbLbv2rpdnu1KRg3HpbRTn5Wsxf4ZGThZofdsxvOnaJPKxdDq WQrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to:arc-authentication-results; bh=OtzN88sM7MZrMLOcbPTppGGxeNl0MBn5TFFEkrQ0A6I=; b=jLZ28+Rs/fLA0Eo34DA5GVQ0vxA7J9StJPN7AVGSHxXGy35xkRwiQWxPoKnqTRPdhA rkl2q+h/ABWzOvNTrWrICwm0k5b4g97Lmz0MO6dC4D2ok8jprsp6MDFm6N5KxUOpFyoU EXD3dOc1i/nhh5iCUHBhYVqZKUtbnerEc2C7eHKRK1KeX57kRT6jzPcaLV/w51+w8o+S VZPaUENI7v/VV5uCOXzNiueHyxYNrv4t0X4jH9/6dO/QXS5WzRaJKldYDR8vRQ/h+5bS 78SfrUI1WzL3rEEjOch3wRahXbnQL3/yDEtcvhuIDDwMb71+e1yahaXPWTLNoDzu2LBq VwIg== 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 88si8293043wrj.58.2017.05.06.02.20.34; Sat, 06 May 2017 02:20:34 -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; 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 AA0DD689A54; Sat, 6 May 2017 12:20:10 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from nef2.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E53EC680ADB for ; Sat, 6 May 2017 12:20:03 +0300 (EEST) Received: from phare.normalesup.org (archicubes.ens.fr [129.199.129.80]) by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id v469K8Hp023330 for ; Sat, 6 May 2017 11:20:09 +0200 (CEST) Received: by phare.normalesup.org (Postfix, from userid 1001) id C6970E00D0; Sat, 6 May 2017 11:20:08 +0200 (CEST) From: Nicolas George To: ffmpeg-devel@ffmpeg.org Date: Sat, 6 May 2017 11:20:06 +0200 Message-Id: <20170506092006.22397-3-george@nsup.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170506092006.22397-1-george@nsup.org> References: <20170506092006.22397-1-george@nsup.org> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef2.ens.fr [129.199.96.32]); Sat, 06 May 2017 11:20:09 +0200 (CEST) Subject: [FFmpeg-devel] [PATCH 3/3] lavfi: add a framework to fix alignment problems. 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" A lot of filters require aligned frame data, but do not document it. It can result in crashes with perfectly valid uses of the API. Signed-off-by: Nicolas George --- libavfilter/avfilter.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 60662c19ac..db9c02b8c0 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -569,6 +569,15 @@ struct AVFilterLink { */ AVBufferRef *hw_frames_ctx; + /** + * Minimum alignment of frame data required by the destination filter. + * All frame data pointers must have the alignment lower bits cleared, + * i.e. be a multiple of 1<