On Mon, Feb 21, 2022 at 12:08 PM Anton Khirnov <[email protected]> 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
> [email protected]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> [email protected] with subject "unsubscribe".
>
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".