From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 57BA04032F for ; Mon, 21 Feb 2022 11:08:02 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6192A68AEAA; Mon, 21 Feb 2022 13:08:00 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3B8DE68A6E0 for ; Mon, 21 Feb 2022 13:07:54 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 94585240179 for ; Mon, 21 Feb 2022 12:07:53 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 8xle9IgkhRdB for ; Mon, 21 Feb 2022 12:07:52 +0100 (CET) Received: from lain.red.khirnov.net (lain.red.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.red.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 8C26C240175 for ; Mon, 21 Feb 2022 12:07:52 +0100 (CET) Received: by lain.red.khirnov.net (Postfix, from userid 1000) id 6D7AF1601AD; Mon, 21 Feb 2022 12:07:52 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <20220220180747.291489-1-onemda@gmail.com> References: <20220220180747.291489-1-onemda@gmail.com> Mail-Followup-To: FFmpeg development discussions and patches Date: Mon, 21 Feb 2022 12:07:52 +0100 Message-ID: <164544167241.19727.2074552888266890134@lain.red.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] avfilter/framepool: fix alignment requirements for audio and video filters X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Quoting Paul B Mahol (2022-02-20 19:07:47) > diff --git a/libavfilter/framepool.c b/libavfilter/framepool.c > index aab408d355..aaf1642b4f 100644 > --- a/libavfilter/framepool.c > +++ b/libavfilter/framepool.c > @@ -76,15 +76,13 @@ FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(size_t size), > } > > if (!pool->linesize[0]) { > - for(i = 1; i <= align; i += i) { > - ret = av_image_fill_linesizes(pool->linesize, pool->format, > - FFALIGN(pool->width, i)); > - if (ret < 0) { > - goto fail; > - } > - if (!(pool->linesize[0] & (pool->align - 1))) > - break; > + ret = av_image_fill_linesizes(pool->linesize, pool->format, > + FFALIGN(pool->width, align)); > + if (ret < 0) { > + goto fail; > } > + if ((pool->linesize[0] & (pool->align - 1))) Check all of them, not just the first one. Otherwise looks good. -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".