Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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)
- Loading branch information
Daniel Engberg
authored and
Daniel Engberg
committed
Mar 25, 2023
1 parent
b9257f4
commit 0ed9c88
Showing
3 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
graphics/blender/files/patch-source_blender_blenkernel_intern_writeffmpeg.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 { |
11 changes: 11 additions & 0 deletions
11
graphics/blender/files/patch-source_blender_imbuf_intern_anim__movie.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 { |
20 changes: 20 additions & 0 deletions
20
graphics/blender/files/patch-source_blender_imbuf_intern_indexer.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 { |