From c7f2f9e883731f7fc6afd5570dd3e77183efd564 Mon Sep 17 00:00:00 2001 From: PioLing <964472638@qq.com> Date: Mon, 18 Dec 2023 16:28:00 +0800 Subject: [PATCH] Change fillPicture (av_image_fill_arrays() ) align size from 1 to 32 (#3142) --- src/Codec/Transcode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Codec/Transcode.cpp b/src/Codec/Transcode.cpp index c1878216..daffe5ac 100644 --- a/src/Codec/Transcode.cpp +++ b/src/Codec/Transcode.cpp @@ -244,8 +244,8 @@ 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); + _data = new char[av_image_get_buffer_size(target_format, target_width, target_height, 32)]; + av_image_fill_arrays(_frame->data, _frame->linesize, (uint8_t *) _data, target_format, target_width, target_height, 32); } ///////////////////////////////////////////////////////////////////////////