From e593ef5fefb5f2861fd43228788f847ed5368abc Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sun, 17 Dec 2023 18:22:58 +0800 Subject: [PATCH] Change av_image_fill_arrays align size from 1 to 32 To avoid crash in some cases --- 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 aaa641fe..c1878216 100644 --- a/src/Codec/Transcode.cpp +++ b/src/Codec/Transcode.cpp @@ -673,7 +673,7 @@ FFmpegFrame::Ptr FFmpegSws::inputFrame(const FFmpegFrame::Ptr &frame, int &ret, auto out = std::make_shared(); if (!out->get()->data[0]) { if (data) { - av_image_fill_arrays(out->get()->data, out->get()->linesize, data, _target_format, target_width, target_height, 1); + av_image_fill_arrays(out->get()->data, out->get()->linesize, data, _target_format, target_width, target_height, 32); } else { out->fillPicture(_target_format, target_width, target_height); }