aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/frame.h
diff options
context:
space:
mode:
authorPavel Koshevoy <pkoshevoy@gmail.com>2024-11-16 08:51:52 -0700
committerJames Almer <jamrial@gmail.com>2024-11-22 10:43:55 -0300
commit46cb7b8d9dcfdea1b1df446a98ec886a4434820c (patch)
tree0ce794554d4d5eac47e788064e501b2f2bb7b71d /libavutil/frame.h
parentea91d978e3be77de42f4b93194a286108de5720f (diff)
downloadffmpeg-46cb7b8d9dcfdea1b1df446a98ec886a4434820c.tar.gz
avutil/frame: also align data pointers in av_frame_get_buffer()
This avoids unpleasant surprises to av_frame_get_buffer callers that explicitly specified 64-byte alignment and didn't get AVFrame.data pointers that are 64-byte aligned. For example, see https://github.com/sekrit-twc/zimg/issues/212 Although the zscale issue has already been resolved by other means it would still be prudent to improve the behavior of av_frame_get_buffer to fix any unknown and future instances of similar issues. Co-authored-by: James Almer <jamrial@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavutil/frame.h')
-rw-r--r--libavutil/frame.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavutil/frame.h b/libavutil/frame.h
index f7806566d5..c107f43bc0 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -887,9 +887,10 @@ void av_frame_move_ref(AVFrame *dst, AVFrame *src);
* cases.
*
* @param frame frame in which to store the new buffers.
- * @param align Required buffer size alignment. If equal to 0, alignment will be
- * chosen automatically for the current CPU. It is highly
- * recommended to pass 0 here unless you know what you are doing.
+ * @param align Required buffer size and data pointer alignment. If equal to 0,
+ * alignment will be chosen automatically for the current CPU.
+ * It is highly recommended to pass 0 here unless you know what
+ * you are doing.
*
* @return 0 on success, a negative AVERROR on error.
*/