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 B849E40344 for ; Mon, 21 Feb 2022 11:33:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3126068AEE4; Mon, 21 Feb 2022 13:33:29 +0200 (EET) Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C452168B113 for ; Mon, 21 Feb 2022 13:33:23 +0200 (EET) Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-2d6923bca1aso125574397b3.9 for ; Mon, 21 Feb 2022 03:33:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=dkQvGN1wUVxeODx/I7Ww2NaFj5aLOHpU5HMDy62fc/8=; b=MzDLftjhGQ0kk4JfpGkrbq4RkETcq0ViRTmgh3a2y3qqSY04QKHr8wa9LOedGaPObt 5yOqWVm7d4dMHg+o65xOEo5dj+P4NmuUinsc9QHftg6ZjN+w6agVs52J8fH976n4SduJ j/vpp06ZyjPfUAnUiq5JhZmaqWFx06p5uQNFmagHKjg+iZv8CrjsY+JooEFgFQusk1HY d6BKf1ILyO6UDuA8dn2JkCrPhSnXHoWD6KjZV3L0Rb30hhOfeDS320k3XlCoX3VlPzLw SsDxxgHY9Az18Zb5yQQYa4+yrY9qij1iDzhqguUz3/8FSpNBAMauJRJHeRWeAamX408S LJ7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=dkQvGN1wUVxeODx/I7Ww2NaFj5aLOHpU5HMDy62fc/8=; b=XNr51pzNxDx9JSNGRe8Ccj7v/2X4DbAe6lOov6Z1Fgnb+Bfs1Da/Q/m3063NM8UI31 opJ/PCIpaTX9i+2hkRyHglddLJCUpORP2BR5rpNy+++7sCIE9JF0q49AL5R8oYNsAQEh wKbiY2aCtFud1UqGB/3kEU22nFNU+MEF1cAFoecn1jhgNnbPn7kUBcIilLB+aadWN/ox DJ02FfuVfGAjj4U8u6pclSTue/ws4xkWrb8rxyVR27c4VvGZEQB1s9r0GJgQxynXi9WR PI3F7+S0pr/jNQMPzyeTEL1eGWvBiMOAHfMnKlpsXee6EPnFDXtBwA6qlcbjoGk8/5El VhzQ== X-Gm-Message-State: AOAM533vG84+kb0PaibLahi6wd2tf2QbWlfprT2vyB25jPiWh9cral3P 4yCXtFQ2agGYgolXkuhntu0OpZXnZ0wEsxclIcERm8zpu3k= X-Google-Smtp-Source: ABdhPJzVEWydiCDEjlYRcqMkmD39imQILMIX2BnimGgN2p2ruhwIqI1EdKbzXgQ6qCc0flcdKK8x0JwMrGnOZrTDSXQ= X-Received: by 2002:a81:486:0:b0:2d7:7785:3f33 with SMTP id 128-20020a810486000000b002d777853f33mr874745ywe.516.1645443202404; Mon, 21 Feb 2022 03:33:22 -0800 (PST) MIME-Version: 1.0 References: <20220220180747.291489-1-onemda@gmail.com> <164544167241.19727.2074552888266890134@lain.red.khirnov.net> In-Reply-To: <164544167241.19727.2074552888266890134@lain.red.khirnov.net> From: Paul B Mahol Date: Mon, 21 Feb 2022 12:34:50 +0100 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: On Mon, Feb 21, 2022 at 12:08 PM Anton Khirnov wrote: > 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. > Will do, it could overflow (among other things) in theory and result than would not be wanted 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". > _______________________________________________ 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".