Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Anton Khirnov <anton@khirnov.net>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] avfilter/framepool: fix alignment requirements for audio and video filters
Date: Mon, 21 Feb 2022 12:07:52 +0100
Message-ID: <164544167241.19727.2074552888266890134@lain.red.khirnov.net> (raw)
In-Reply-To: <20220220180747.291489-1-onemda@gmail.com>

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".

  reply	other threads:[~2022-02-21 11:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-20 18:07 Paul B Mahol
2022-02-21 11:07 ` Anton Khirnov [this message]
2022-02-21 11:34   ` Paul B Mahol
2022-02-20 22:02 Paul B Mahol
2022-02-21  1:53 ` James Almer
2022-02-21 11:33   ` Paul B Mahol
2022-02-21 12:08     ` James Almer
2022-02-21 12:27 Paul B Mahol
2022-02-21 17:57 ` James Almer
2022-02-21 18:14   ` Paul B Mahol
2022-02-21 22:36     ` James Almer
2022-03-01  7:12 ` Xiang, Haihao
2022-03-01  8:07   ` Paul B Mahol
2022-03-01 13:43   ` James Almer
2022-03-02  7:23     ` Xiang, Haihao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=164544167241.19727.2074552888266890134@lain.red.khirnov.net \
    --to=anton@khirnov.net \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git