Commit e5f1fdbc30 for ffmpeg
commit e5f1fdbc300401944fcbfcec70dd59bba88b4539
Author: Ramiro Polla <ramiro.polla@gmail.com>
Date: Mon Nov 23 00:56:16 2026 +0100
avutil/frame: also align the first plane in av_frame_get_buffer()
In 46cb7b8d9d, the data pointers in av_frame_get_buffer() were aligned
for planes 1 through 3, but plane 0 was still left at the alignment of
the allocator.
Signed-off-by: Ramiro Polla <ramiro.polla@gmail.com>
diff --git a/libavutil/frame.c b/libavutil/frame.c
index c79c1b76d5..3444cf50d2 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -129,7 +129,8 @@ int ff_frame_get_video_buffer(AVFrame *frame, int align,
}
if ((ret = av_image_fill_pointers(frame->data, frame->format, padded_height,
- frame->buf[0]->data, frame->linesize)) < 0)
+ (uint8_t *)FFALIGN((uintptr_t)frame->buf[0]->data, align),
+ frame->linesize)) < 0)
goto fail;
for (int i = 1; i < 4; i++) {