Package: blender
Version: 3.4.1+dfsg-2+b1
Blender currently does not compile against ffmpeg 6.0. Support for
ffmpeg 6 can be added by applying the attached patch developed for freebsd:
https://cgit.freebsd.org/ports/commit/?id=0ed9c88a8c2de8744cb63163bdff9f9e4a71693e
<https://cgit.freebsd.org/ports/commit/?id=0ed9c88a8c2de8744cb63163bdff9f9e4a71693e>
Compilation is successful with the patch, which is provided with this
bug report.
I am using Ubuntu Mantic 23.10 (testing).
diff -Nru blender-3.4.1.orig/source/blender/blenkernel/intern/writeffmpeg.c
blender-3.4.1/source/blender/blenkernel/intern/writeffmpeg.c
--- blender-3.4.1.orig/source/blender/blenkernel/intern/writeffmpeg.c
2022-11-08 14:50:16
+++ blender-3.4.1/source/blender/blenkernel/intern/writeffmpeg.c
2023-08-03 16:09:41
@@ -855,7 +855,7 @@
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 {
diff -Nru blender-3.4.1.orig/source/blender/imbuf/intern/anim_movie.c
blender-3.4.1/source/blender/imbuf/intern/anim_movie.c
--- blender-3.4.1.orig/source/blender/imbuf/intern/anim_movie.c 2022-11-04
01:33:07
+++ blender-3.4.1/source/blender/imbuf/intern/anim_movie.c 2023-08-03
16:10:39
@@ -554,7 +554,7 @@
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 {
diff -Nru blender-3.4.1.orig/source/blender/imbuf/intern/indexer.c
blender-3.4.1/source/blender/imbuf/intern/indexer.c
--- blender-3.4.1.orig/source/blender/imbuf/intern/indexer.c 2022-11-04
01:33:07
+++ blender-3.4.1/source/blender/imbuf/intern/indexer.c 2023-08-03 16:11:19
@@ -559,7 +559,7 @@
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 @@
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 {