graphics/blender: Fix compatibility with FFmpeg 6.0

Fix build with FFmpeg 6.0

Source:
https://github.com/archlinux/svntogit-community/blob/master/blender/trunk/blender-ffmpeg6.patch

PR:		270275
Reviewed by:	Shane Ambler <FreeBSD@ShaneWare.Biz> (maintainer)
This commit is contained in:
Daniel Engberg 2023-03-25 15:48:29 +01:00
parent b9257f487c
commit 0ed9c88a8c
3 changed files with 42 additions and 0 deletions

View file

@ -0,0 +1,11 @@
--- source/blender/blenkernel/intern/writeffmpeg.c.orig 2022-11-08 13:50:16 UTC
+++ source/blender/blenkernel/intern/writeffmpeg.c
@@ -855,7 +855,7 @@ static AVStream *alloc_video_stream(FFMpegContext *con
255);
st->avg_frame_rate = av_inv_q(c->time_base);
- if (codec->capabilities & AV_CODEC_CAP_AUTO_THREADS) {
+ if (codec->capabilities & AV_CODEC_CAP_OTHER_THREADS) {
c->thread_count = 0;
}
else {

View file

@ -0,0 +1,11 @@
--- source/blender/imbuf/intern/anim_movie.c.orig 2022-11-04 00:33:07 UTC
+++ source/blender/imbuf/intern/anim_movie.c
@@ -554,7 +554,7 @@ static int startffmpeg(struct anim *anim)
avcodec_parameters_to_context(pCodecCtx, video_stream->codecpar);
pCodecCtx->workaround_bugs = FF_BUG_AUTODETECT;
- if (pCodec->capabilities & AV_CODEC_CAP_AUTO_THREADS) {
+ if (pCodec->capabilities & AV_CODEC_CAP_OTHER_THREADS) {
pCodecCtx->thread_count = 0;
}
else {

View file

@ -0,0 +1,20 @@
--- source/blender/imbuf/intern/indexer.c.orig 2022-11-04 00:33:07 UTC
+++ source/blender/imbuf/intern/indexer.c
@@ -559,7 +559,7 @@ static struct proxy_output_ctx *alloc_proxy_output_ffm
av_dict_set(&codec_opts, "preset", "veryfast", 0);
av_dict_set(&codec_opts, "tune", "fastdecode", 0);
- if (rv->codec->capabilities & AV_CODEC_CAP_AUTO_THREADS) {
+ if (rv->codec->capabilities & AV_CODEC_CAP_OTHER_THREADS) {
rv->c->thread_count = 0;
}
else {
@@ -872,7 +872,7 @@ static IndexBuildContext *index_ffmpeg_create_context(
avcodec_parameters_to_context(context->iCodecCtx, context->iStream->codecpar);
context->iCodecCtx->workaround_bugs = FF_BUG_AUTODETECT;
- if (context->iCodec->capabilities & AV_CODEC_CAP_AUTO_THREADS) {
+ if (context->iCodec->capabilities & AV_CODEC_CAP_OTHER_THREADS) {
context->iCodecCtx->thread_count = 0;
}
else {