Change fillPicture (av_image_fill_arrays )align size from 1 to 32

This commit is contained in:
PioLing 2023-12-18 15:47:14 +08:00 committed by GitHub
parent d252895df6
commit 5899dd48ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -245,7 +245,7 @@ AVFrame *FFmpegFrame::get() const {
void FFmpegFrame::fillPicture(AVPixelFormat target_format, int target_width, int target_height) { void FFmpegFrame::fillPicture(AVPixelFormat target_format, int target_width, int target_height) {
assert(_data == nullptr); assert(_data == nullptr);
_data = new char[av_image_get_buffer_size(target_format, target_width, target_height, 1)]; _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);
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////