ffmpeg deprecated avpicture_fill

modify avpicture_fill to av_image_fill_arrays
This commit is contained in:
ljx0305 2023-03-07 10:30:00 +08:00 committed by GitHub
parent d05c9d5f51
commit e326d04aed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -672,7 +672,8 @@ FFmpegFrame::Ptr FFmpegSws::inputFrame(const FFmpegFrame::Ptr &frame, int &ret,
auto out = std::make_shared<FFmpegFrame>();
if (!out->get()->data[0]) {
if (data) {
avpicture_fill((AVPicture *) out->get(), data, _target_format, target_width, target_height);
//avpicture_fill((AVPicture *) out->get(), data, _target_format, target_width, target_height);
av_image_fill_arrays(out->get()->data, out->get()->linesize, data, _target_format, target_width, target_height, 1);
} else {
out->fillPicture(_target_format, target_width, target_height);
}