From 5899dd48ed6839f07728787e4fd22a94c450bbbf Mon Sep 17 00:00:00 2001 From: PioLing <964472638@qq.com> Date: Mon, 18 Dec 2023 15:47:14 +0800 Subject: [PATCH] Change fillPicture (av_image_fill_arrays )align size from 1 to 32 --- src/Codec/Transcode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Codec/Transcode.cpp b/src/Codec/Transcode.cpp index c1878216..1faf4a55 100644 --- a/src/Codec/Transcode.cpp +++ b/src/Codec/Transcode.cpp @@ -245,7 +245,7 @@ AVFrame *FFmpegFrame::get() const { void FFmpegFrame::fillPicture(AVPixelFormat target_format, int target_width, int target_height) { assert(_data == nullptr); _data = new char[av_image_get_buffer_size(target_format, target_width, target_height, 1)]; - av_image_fill_arrays(_frame->data, _frame->linesize, (uint8_t *) _data, target_format, target_width, target_height,1); + av_image_fill_arrays(_frame->data, _frame->linesize, (uint8_t *) _data, target_format, target_width, target_height,32); } ///////////////////////////////////////////////////////////////////////////