[FFmpeg-devel] [PATCH] avfilter/framepool: use aligned height when allocating plane buffers

StreamNG Harold Camargo haroldcamargo at stream-ng.com
Sun Nov 20 21:41:20 EET 2022


Hello, unsuscribe.

bye

Harold F. Camargo R.
Stream NG
Cel. 318 3227862
Bogotá Colombia
www.stream-ng.com


El dom, 20 nov 2022 a las 12:06, James Almer (<jamrial at gmail.com>) escribió:

> Fixes tickets #10051 and #10052.
>
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  libavfilter/framepool.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/libavfilter/framepool.c b/libavfilter/framepool.c
> index 0404589055..7e830c5a3b 100644
> --- a/libavfilter/framepool.c
> +++ b/libavfilter/framepool.c
> @@ -91,15 +91,13 @@ FFFramePool *ff_frame_pool_video_init(AVBufferRef*
> (*alloc)(size_t size),
>          linesizes[i] = pool->linesize[i];
>
>      if (av_image_fill_plane_sizes(sizes, pool->format,
> -                                  pool->height,
> +                                  FFALIGN(pool->height, align),
>                                    linesizes) < 0) {
>          goto fail;
>      }
>
>      for (i = 0; i < 4 && sizes[i]; i++) {
> -        if (sizes[i] > SIZE_MAX - align)
> -            goto fail;
> -        pool->pools[i] = av_buffer_pool_init(sizes[i] + align, alloc);
> +        pool->pools[i] = av_buffer_pool_init(sizes[i], alloc);
>          if (!pool->pools[i])
>              goto fail;
>      }
> --
> 2.38.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-devel mailing list