From a94213f36dabf4be4dc34c8c9f07504cd2ddb042 Mon Sep 17 00:00:00 2001 From: zlice Date: Mon, 22 Dec 2025 17:09:46 -0500 Subject: [PATCH 001/115] ffmpeg6: remove package --- common/shlibs | 8 - srcpkgs/ffmpeg6-devel | 1 - ...decode-multiple-slice-params-buffers.patch | 159 ------------- ...the-same-slice-buffer-multiple-times.patch | 89 ------- .../patches/intel-media-driver-32bit.patch | 15 -- srcpkgs/ffmpeg6/patches/qt6-webengine.patch | 36 --- srcpkgs/ffmpeg6/patches/svt-av1-3.0.patch | 16 -- srcpkgs/ffmpeg6/patches/svt-av1-4.0.patch | 27 --- srcpkgs/ffmpeg6/patches/v4l2-fix-glibc.patch | 17 -- srcpkgs/ffmpeg6/patches/vulkan-gcc14.patch | 101 -------- srcpkgs/ffmpeg6/template | 217 ------------------ srcpkgs/ffplay6 | 1 - srcpkgs/libavcodec6 | 1 - srcpkgs/libavdevice6 | 1 - srcpkgs/libavfilter6 | 1 - srcpkgs/libavformat6 | 1 - srcpkgs/libavresample6 | 1 - srcpkgs/libavutil6 | 1 - srcpkgs/libpostproc6 | 1 - srcpkgs/libswresample6 | 1 - srcpkgs/libswscale6 | 1 - srcpkgs/removed-packages/template | 12 + 22 files changed, 12 insertions(+), 696 deletions(-) delete mode 120000 srcpkgs/ffmpeg6-devel delete mode 100644 srcpkgs/ffmpeg6/patches/00001-vaapi_decode-multiple-slice-params-buffers.patch delete mode 100644 srcpkgs/ffmpeg6/patches/00002-lavc-vaapi_av1-Avoid-sending-the-same-slice-buffer-multiple-times.patch delete mode 100644 srcpkgs/ffmpeg6/patches/intel-media-driver-32bit.patch delete mode 100644 srcpkgs/ffmpeg6/patches/qt6-webengine.patch delete mode 100644 srcpkgs/ffmpeg6/patches/svt-av1-3.0.patch delete mode 100644 srcpkgs/ffmpeg6/patches/svt-av1-4.0.patch delete mode 100644 srcpkgs/ffmpeg6/patches/v4l2-fix-glibc.patch delete mode 100644 srcpkgs/ffmpeg6/patches/vulkan-gcc14.patch delete mode 100644 srcpkgs/ffmpeg6/template delete mode 120000 srcpkgs/ffplay6 delete mode 120000 srcpkgs/libavcodec6 delete mode 120000 srcpkgs/libavdevice6 delete mode 120000 srcpkgs/libavfilter6 delete mode 120000 srcpkgs/libavformat6 delete mode 120000 srcpkgs/libavresample6 delete mode 120000 srcpkgs/libavutil6 delete mode 120000 srcpkgs/libpostproc6 delete mode 120000 srcpkgs/libswresample6 delete mode 120000 srcpkgs/libswscale6 diff --git a/common/shlibs b/common/shlibs index 227fbf902134ee..44ace2a61369b4 100644 --- a/common/shlibs +++ b/common/shlibs @@ -400,14 +400,6 @@ libid3tag.so.0 libid3tag-0.16.4_1 libgif.so.7 giflib-5.1.0_1 libImlib2.so.1 imlib2-1.4.2_1 libmp3lame.so.0 lame-3.98.2_1 -libavdevice.so.60 libavdevice6-6.0_1 -libavformat.so.60 libavformat6-6.0_1 -libswscale.so.7 libswscale6-6.0_1 -libswresample.so.4 libswresample6-6.0_1 -libpostproc.so.57 libpostproc6-6.0_1 -libavcodec.so.60 libavcodec6-6.0_1 -libavutil.so.58 libavutil6-6.0_1 -libavfilter.so.9 libavfilter6-6.0_1 libdispatch.so libdispatch-5.10.1_1 libBlocksRuntime.so libdispatch-5.10.1_1 libavdevice.so.58 libavdevice-4.0_1 diff --git a/srcpkgs/ffmpeg6-devel b/srcpkgs/ffmpeg6-devel deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/ffmpeg6-devel +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/ffmpeg6/patches/00001-vaapi_decode-multiple-slice-params-buffers.patch b/srcpkgs/ffmpeg6/patches/00001-vaapi_decode-multiple-slice-params-buffers.patch deleted file mode 100644 index 2350577fd6ec58..00000000000000 --- a/srcpkgs/ffmpeg6/patches/00001-vaapi_decode-multiple-slice-params-buffers.patch +++ /dev/null @@ -1,159 +0,0 @@ -diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c -index d0339b2..6f33f03 100644 ---- a/libavcodec/vaapi_av1.c -+++ b/libavcodec/vaapi_av1.c -@@ -421,7 +421,7 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx, - .tg_end = s->tg_end, - }; - -- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, -+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, 1, - sizeof(VASliceParameterBufferAV1), - buffer, - size); -diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c -index 134f10e..c6d90ac 100644 ---- a/libavcodec/vaapi_decode.c -+++ b/libavcodec/vaapi_decode.c -@@ -61,6 +61,7 @@ int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx, - int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, - VAAPIDecodePicture *pic, - const void *params_data, -+ int nb_params, - size_t params_size, - const void *slice_data, - size_t slice_size) -@@ -89,7 +90,7 @@ int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, - - vas = vaCreateBuffer(ctx->hwctx->display, ctx->va_context, - VASliceParameterBufferType, -- params_size, 1, (void*)params_data, -+ params_size, nb_params, (void*)params_data, - &pic->slice_buffers[index]); - if (vas != VA_STATUS_SUCCESS) { - av_log(avctx, AV_LOG_ERROR, "Failed to create slice " -diff --git a/libavcodec/vaapi_decode.h b/libavcodec/vaapi_decode.h -index 6beda14..22c8c54 100644 ---- a/libavcodec/vaapi_decode.h -+++ b/libavcodec/vaapi_decode.h -@@ -73,6 +73,7 @@ int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx, - int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, - VAAPIDecodePicture *pic, - const void *params_data, -+ int nb_params, - size_t params_size, - const void *slice_data, - size_t slice_size); -diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c -index 9332aa6..0536ee8 100644 ---- a/libavcodec/vaapi_h264.c -+++ b/libavcodec/vaapi_h264.c -@@ -375,7 +375,7 @@ static int vaapi_h264_decode_slice(AVCodecContext *avctx, - slice_param.chroma_offset_l1); - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err) { - ff_vaapi_decode_cancel(avctx, pic); -diff --git a/libavcodec/vaapi_hevc.c b/libavcodec/vaapi_hevc.c -index 20fb36a..6f022a7 100644 ---- a/libavcodec/vaapi_hevc.c -+++ b/libavcodec/vaapi_hevc.c -@@ -305,7 +305,7 @@ static int vaapi_hevc_end_frame(AVCodecContext *avctx) - if (pic->last_size) { - last_slice_param->LongSliceFlags.fields.LastSliceOfPic = 1; - ret = ff_vaapi_decode_make_slice_buffer(avctx, &pic->pic, -- &pic->last_slice_param, slice_param_size, -+ &pic->last_slice_param, 1, slice_param_size, - pic->last_buffer, pic->last_size); - if (ret < 0) - goto fail; -@@ -423,7 +423,7 @@ static int vaapi_hevc_decode_slice(AVCodecContext *avctx, - - if (!sh->first_slice_in_pic_flag) { - err = ff_vaapi_decode_make_slice_buffer(avctx, &pic->pic, -- &pic->last_slice_param, slice_param_size, -+ &pic->last_slice_param, 1, slice_param_size, - pic->last_buffer, pic->last_size); - pic->last_buffer = NULL; - pic->last_size = 0; -diff --git a/libavcodec/vaapi_mjpeg.c b/libavcodec/vaapi_mjpeg.c -index 8158211..3ee1663 100644 ---- a/libavcodec/vaapi_mjpeg.c -+++ b/libavcodec/vaapi_mjpeg.c -@@ -131,7 +131,7 @@ static int vaapi_mjpeg_decode_slice(AVCodecContext *avctx, - sp.components[i].ac_table_selector = s->ac_index[i]; - } - -- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, sizeof(sp), buffer, size); -+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, 1, sizeof(sp), buffer, size); - if (err) - goto fail; - -diff --git a/libavcodec/vaapi_mpeg2.c b/libavcodec/vaapi_mpeg2.c -index 5e2b889..8b37239 100644 ---- a/libavcodec/vaapi_mpeg2.c -+++ b/libavcodec/vaapi_mpeg2.c -@@ -162,7 +162,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer - }; - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err < 0) { - ff_vaapi_decode_cancel(avctx, pic); -diff --git a/libavcodec/vaapi_mpeg4.c b/libavcodec/vaapi_mpeg4.c -index 4e74e03..d2e1d15 100644 ---- a/libavcodec/vaapi_mpeg4.c -+++ b/libavcodec/vaapi_mpeg4.c -@@ -169,7 +169,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer - }; - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err < 0) { - ff_vaapi_decode_cancel(avctx, pic); -diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c -index fb2132e..a4933c9 100644 ---- a/libavcodec/vaapi_vc1.c -+++ b/libavcodec/vaapi_vc1.c -@@ -490,7 +490,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, - }; - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err < 0) { - ff_vaapi_decode_cancel(avctx, pic); -diff --git a/libavcodec/vaapi_vp8.c b/libavcodec/vaapi_vp8.c -index 5b18bf8..3c16e6d 100644 ---- a/libavcodec/vaapi_vp8.c -+++ b/libavcodec/vaapi_vp8.c -@@ -209,7 +209,7 @@ static int vaapi_vp8_decode_slice(AVCodecContext *avctx, - for (i = 0; i < 8; i++) - sp.partition_size[i+1] = s->coeff_partition_size[i]; - -- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, sizeof(sp), data, data_size); -+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, 1, sizeof(sp), data, data_size); - if (err) - goto fail; - -diff --git a/libavcodec/vaapi_vp9.c b/libavcodec/vaapi_vp9.c -index 776382f..237f6c5 100644 ---- a/libavcodec/vaapi_vp9.c -+++ b/libavcodec/vaapi_vp9.c -@@ -158,7 +158,7 @@ static int vaapi_vp9_decode_slice(AVCodecContext *avctx, - } - - err = ff_vaapi_decode_make_slice_buffer(avctx, pic, -- &slice_param, sizeof(slice_param), -+ &slice_param, 1, sizeof(slice_param), - buffer, size); - if (err) { - ff_vaapi_decode_cancel(avctx, pic); diff --git a/srcpkgs/ffmpeg6/patches/00002-lavc-vaapi_av1-Avoid-sending-the-same-slice-buffer-multiple-times.patch b/srcpkgs/ffmpeg6/patches/00002-lavc-vaapi_av1-Avoid-sending-the-same-slice-buffer-multiple-times.patch deleted file mode 100644 index aae66d8921dfe3..00000000000000 --- a/srcpkgs/ffmpeg6/patches/00002-lavc-vaapi_av1-Avoid-sending-the-same-slice-buffer-multiple-times.patch +++ /dev/null @@ -1,89 +0,0 @@ -diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c -index d0339b2..c4b55cb 100644 ---- a/libavcodec/vaapi_av1.c -+++ b/libavcodec/vaapi_av1.c -@@ -19,6 +19,7 @@ - */ - - #include "libavutil/frame.h" -+#include "libavutil/mem.h" - #include "hwaccel_internal.h" - #include "vaapi_decode.h" - #include "internal.h" -@@ -43,6 +44,9 @@ typedef struct VAAPIAV1DecContext { - */ - VAAPIAV1FrameRef ref_tab[AV1_NUM_REF_FRAMES]; - AVFrame *tmp_frame; -+ -+ int nb_slice_params; -+ VASliceParameterBufferAV1 *slice_params; - } VAAPIAV1DecContext; - - static VASurfaceID vaapi_av1_surface_id(AV1Frame *vf) -@@ -109,6 +113,8 @@ static int vaapi_av1_decode_uninit(AVCodecContext *avctx) - av_frame_free(&ctx->ref_tab[i].frame); - } - -+ av_freep(&ctx->slice_params); -+ - return ff_vaapi_decode_uninit(avctx); - } - -@@ -405,13 +411,24 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx, - { - const AV1DecContext *s = avctx->priv_data; - VAAPIDecodePicture *pic = s->cur_frame.hwaccel_picture_private; -- VASliceParameterBufferAV1 slice_param; -- int err = 0; -+ VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data; -+ int err, nb_params; -+ -+ nb_params = s->tg_end - s->tg_start + 1; -+ if (ctx->nb_slice_params < nb_params) { -+ ctx->slice_params = av_realloc_array(ctx->slice_params, -+ nb_params, -+ sizeof(*ctx->slice_params)); -+ if (!ctx->slice_params) { -+ ctx->nb_slice_params = 0; -+ err = AVERROR(ENOMEM); -+ goto fail; -+ } -+ ctx->nb_slice_params = nb_params; -+ } - - for (int i = s->tg_start; i <= s->tg_end; i++) { -- memset(&slice_param, 0, sizeof(VASliceParameterBufferAV1)); -- -- slice_param = (VASliceParameterBufferAV1) { -+ ctx->slice_params[i - s->tg_start] = (VASliceParameterBufferAV1) { - .slice_data_size = s->tile_group_info[i].tile_size, - .slice_data_offset = s->tile_group_info[i].tile_offset, - .slice_data_flag = VA_SLICE_DATA_FLAG_ALL, -@@ -421,17 +438,19 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx, - .tg_end = s->tg_end, - }; - -- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, 1, -- sizeof(VASliceParameterBufferAV1), -- buffer, -- size); -- if (err) { -- ff_vaapi_decode_cancel(avctx, pic); -- return err; -- } - } -+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, ctx->slice_params, nb_params, -+ sizeof(VASliceParameterBufferAV1), -+ buffer, -+ size); -+ if (err) -+ goto fail; - - return 0; -+ -+fail: -+ ff_vaapi_decode_cancel(avctx, pic); -+ return err; - } - - const AVHWAccel ff_av1_vaapi_hwaccel = { diff --git a/srcpkgs/ffmpeg6/patches/intel-media-driver-32bit.patch b/srcpkgs/ffmpeg6/patches/intel-media-driver-32bit.patch deleted file mode 100644 index 8e40e554f6a225..00000000000000 --- a/srcpkgs/ffmpeg6/patches/intel-media-driver-32bit.patch +++ /dev/null @@ -1,15 +0,0 @@ -Fix type to be consistent with intel-media-driver - -diff -rup libavutil/hwcontext_vaapi.c.orig libavutil/hwcontext_vaapi.c ---- a/libavutil/hwcontext_vaapi.c -+++ b/libavutil/hwcontext_vaapi.c -@@ -1203,7 +1203,7 @@ static int vaapi_map_from_drm(AVHWFrames - - if (!use_prime2 || vas != VA_STATUS_SUCCESS) { - int k; -- unsigned long buffer_handle; -+ uintptr_t buffer_handle; - VASurfaceAttribExternalBuffers buffer_desc; - VASurfaceAttrib buffer_attrs[2] = { - { - diff --git a/srcpkgs/ffmpeg6/patches/qt6-webengine.patch b/srcpkgs/ffmpeg6/patches/qt6-webengine.patch deleted file mode 100644 index c0b397ba849438..00000000000000 --- a/srcpkgs/ffmpeg6/patches/qt6-webengine.patch +++ /dev/null @@ -1,36 +0,0 @@ -https://aur.archlinux.org/cgit/aur.git/tree/040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch?h=ffmpeg-intel-full-git -diff --git a/libavformat/avformat.h b/libavformat/avformat.h -index cd7b0d941c..b4a6dce885 100644 ---- a/libavformat/avformat.h -+++ b/libavformat/avformat.h -@@ -1025,6 +1025,10 @@ - - #define AV_PROGRAM_RUNNING 1 - -+// Chromium: We use the internal field first_dts vvv -+int64_t av_stream_get_first_dts(const AVStream *st); -+// Chromium: We use the internal field first_dts ^^^ -+ - /** - * New fields can be added to the end with minor version bumps. - * Removal, reordering and changes to existing fields require a major - -diff --git a/libavformat/utils.c b/libavformat/utils.c -index de7580c32d..0ef0fe530e 100644 ---- a/libavformat/utils.c -+++ b/libavformat/utils.c -@@ -152,6 +152,13 @@ - return AV_CODEC_ID_NONE; - } - -+// Chromium: We use the internal field first_dts vvv -+int64_t av_stream_get_first_dts(const AVStream *st) -+{ -+ return cffstream(st)->first_dts; -+} -+// Chromium: We use the internal field first_dts ^^^ -+ - enum AVCodecID ff_get_pcm_codec_id(int bps, int flt, int be, int sflags) - { - if (bps <= 0 || bps > 64) - diff --git a/srcpkgs/ffmpeg6/patches/svt-av1-3.0.patch b/srcpkgs/ffmpeg6/patches/svt-av1-3.0.patch deleted file mode 100644 index 6ada631ab692bb..00000000000000 --- a/srcpkgs/ffmpeg6/patches/svt-av1-3.0.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c -index 79b28eb4df546..43fe531fde74d 100644 ---- a/libavcodec/libsvtav1.c -+++ b/libavcodec/libsvtav1.c -@@ -435,7 +435,11 @@ static av_cold int eb_enc_init(AVCodecContext *avctx) - - svt_enc->eos_flag = EOS_NOT_REACHED; - -+#if SVT_AV1_CHECK_VERSION(3, 0, 0) -+ svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, &svt_enc->enc_params); -+#else - svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, svt_enc, &svt_enc->enc_params); -+#endif - if (svt_ret != EB_ErrorNone) { - return svt_print_error(avctx, svt_ret, "Error initializing encoder handle"); - } diff --git a/srcpkgs/ffmpeg6/patches/svt-av1-4.0.patch b/srcpkgs/ffmpeg6/patches/svt-av1-4.0.patch deleted file mode 100644 index efa0e33f3aa604..00000000000000 --- a/srcpkgs/ffmpeg6/patches/svt-av1-4.0.patch +++ /dev/null @@ -1,27 +0,0 @@ -From a5d4c398b411a00ac09d8fe3b66117222323844c Mon Sep 17 00:00:00 2001 -From: Christopher Degawa -Date: Wed, 21 Jan 2026 00:12:59 -0600 -Subject: [PATCH] avcodec/libsvtav1: rename aq_mode for v4.0.0 - -Signed-off-by: Christopher Degawa -Signed-off-by: James Almer ---- - libavcodec/libsvtav1.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c -index 7047b72422fb3..90c61b98a1bf3 100644 ---- a/libavcodec/libsvtav1.c -+++ b/libavcodec/libsvtav1.c -@@ -237,7 +237,11 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, - } else if (svt_enc->qp > 0) { - param->qp = svt_enc->qp; - param->rate_control_mode = 0; -+#if SVT_AV1_CHECK_VERSION(4, 0, 0) -+ param->aq_mode = 0; -+#else - param->enable_adaptive_quantization = 0; -+#endif - } - - desc = av_pix_fmt_desc_get(avctx->pix_fmt); diff --git a/srcpkgs/ffmpeg6/patches/v4l2-fix-glibc.patch b/srcpkgs/ffmpeg6/patches/v4l2-fix-glibc.patch deleted file mode 100644 index e4c9b1eb6c8f5b..00000000000000 --- a/srcpkgs/ffmpeg6/patches/v4l2-fix-glibc.patch +++ /dev/null @@ -1,17 +0,0 @@ -libv4l2.h uses #ifdef, not #if - -diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c -index 42d4b97c8f701..0ae68723382f4 100644 ---- a/libavdevice/v4l2.c -+++ b/libavdevice/v4l2.c -@@ -47,6 +47,10 @@ - #include "v4l2-common.h" - #include - -+#if ! HAVE_POSIX_IOCTL -+#undef HAVE_POSIX_IOCTL -+#endif -+ - #if CONFIG_LIBV4L2 - #include - #endif diff --git a/srcpkgs/ffmpeg6/patches/vulkan-gcc14.patch b/srcpkgs/ffmpeg6/patches/vulkan-gcc14.patch deleted file mode 100644 index c968e47329c086..00000000000000 --- a/srcpkgs/ffmpeg6/patches/vulkan-gcc14.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 2f24f10d9cf34ddce274496c4daa73f732d370c1 Mon Sep 17 00:00:00 2001 -From: Sam James -Date: Wed, 20 Dec 2023 12:32:43 +0000 -Subject: [PATCH] libavcodec: fix -Wint-conversion in vulkan -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -FIx warnings (soon to be errors in GCC 14, already so in Clang 15): -``` -src/libavcodec/vulkan_av1.c: In function ‘vk_av1_create_params’: -src/libavcodec/vulkan_av1.c:183:43: error: initialization of ‘long long unsigned int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion] - 183 | .videoSessionParametersTemplate = NULL, - | ^~~~ -src/libavcodec/vulkan_av1.c:183:43: note: (near initialization for ‘(anonymous).videoSessionParametersTemplate’) -``` - -Use Vulkan's VK_NULL_HANDLE instead of bare NULL. - -Fix Trac ticket #10724. - -Was reported downstream in Gentoo at https://bugs.gentoo.org/919067. - -Signed-off-by: Sam James ---- - libavcodec/vulkan_av1.c | 2 +- - libavcodec/vulkan_decode.c | 6 +++--- - libavcodec/vulkan_h264.c | 2 +- - libavcodec/vulkan_hevc.c | 2 +- - libavcodec/vulkan_video.c | 2 +- - 5 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/libavcodec/vulkan_av1.c b/libavcodec/vulkan_av1.c -index 4998bf7ebc55f..9730e4b08dd40 100644 ---- a/libavcodec/vulkan_av1.c -+++ b/libavcodec/vulkan_av1.c -@@ -180,7 +180,7 @@ static int vk_av1_create_params(AVCodecContext *avctx, AVBufferRef **buf) - .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR, - .pNext = &av1_params, - .videoSession = ctx->common.session, -- .videoSessionParametersTemplate = NULL, -+ .videoSessionParametersTemplate = VK_NULL_HANDLE, - }; - - err = ff_vk_decode_create_params(buf, avctx, ctx, &session_params_create); -diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c -index a89d84fcaa972..fdbcbb450a1e0 100644 ---- a/libavcodec/vulkan_decode.c -+++ b/libavcodec/vulkan_decode.c -@@ -188,9 +188,9 @@ int ff_vk_decode_prepare_frame(FFVulkanDecodeContext *dec, AVFrame *pic, - return 0; - - vkpic->dpb_frame = NULL; -- vkpic->img_view_ref = NULL; -- vkpic->img_view_out = NULL; -- vkpic->img_view_dest = NULL; -+ vkpic->img_view_ref = VK_NULL_HANDLE; -+ vkpic->img_view_out = VK_NULL_HANDLE; -+ vkpic->img_view_dest = VK_NULL_HANDLE; - - vkpic->destroy_image_view = vk->DestroyImageView; - vkpic->wait_semaphores = vk->WaitSemaphores; -diff --git a/libavcodec/vulkan_h264.c b/libavcodec/vulkan_h264.c -index e727aafb162d3..39c123ddca57e 100644 ---- a/libavcodec/vulkan_h264.c -+++ b/libavcodec/vulkan_h264.c -@@ -315,7 +315,7 @@ static int vk_h264_create_params(AVCodecContext *avctx, AVBufferRef **buf) - .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR, - .pNext = &h264_params, - .videoSession = ctx->common.session, -- .videoSessionParametersTemplate = NULL, -+ .videoSessionParametersTemplate = VK_NULL_HANDLE, - }; - - /* SPS list */ -diff --git a/libavcodec/vulkan_hevc.c b/libavcodec/vulkan_hevc.c -index 99fdcf3b45839..033172cbd6958 100644 ---- a/libavcodec/vulkan_hevc.c -+++ b/libavcodec/vulkan_hevc.c -@@ -653,7 +653,7 @@ static int vk_hevc_create_params(AVCodecContext *avctx, AVBufferRef **buf) - .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR, - .pNext = &h265_params, - .videoSession = ctx->common.session, -- .videoSessionParametersTemplate = NULL, -+ .videoSessionParametersTemplate = VK_NULL_HANDLE, - }; - - HEVCHeaderSet *hdr; -diff --git a/libavcodec/vulkan_video.c b/libavcodec/vulkan_video.c -index 5fa8292b28eaf..fb20315db4bbf 100644 ---- a/libavcodec/vulkan_video.c -+++ b/libavcodec/vulkan_video.c -@@ -287,7 +287,7 @@ av_cold void ff_vk_video_common_uninit(FFVulkanContext *s, - if (common->session) { - vk->DestroyVideoSessionKHR(s->hwctx->act_dev, common->session, - s->hwctx->alloc); -- common->session = NULL; -+ common->session = VK_NULL_HANDLE; - } - - if (common->nb_mem && common->mem) diff --git a/srcpkgs/ffmpeg6/template b/srcpkgs/ffmpeg6/template deleted file mode 100644 index 1147af7e0302c4..00000000000000 --- a/srcpkgs/ffmpeg6/template +++ /dev/null @@ -1,217 +0,0 @@ -# Template file for 'ffmpeg6' -# audacity also needs to be bumped when a new ffmpeg version bumps libavformat's soname! -pkgname=ffmpeg6 -version=6.1.6 -revision=3 -hostmakedepends="pkg-config perl" -makedepends="zlib-devel bzip2-devel freetype-devel alsa-lib-devel libXfixes-devel - libXext-devel libXvMC-devel libxcb-devel lame-devel libtheora-devel - libvorbis-devel x264-devel xvidcore-devel jack-devel SDL2-devel libsoxr-devel - libcdio-paranoia-devel librtmp-devel libopenmpt-devel gnutls-devel - speex-devel celt-devel harfbuzz-devel libass-devel opus-devel ocl-icd-devel - libbs2b-devel libvidstab-devel vmaf-devel libbluray-devel pulseaudio-devel - x265-devel v4l-utils-devel libvpx-devel libaom-devel libdav1d-devel - libwebp-devel libdrm-devel srt-devel librist-devel vulkan-loader-devel - zimg-devel libmysofa-devel libsvt-av1-devel libjxl-devel - $(vopt_if vdpau libvdpau-devel) $(vopt_if fdk_aac fdk-aac-devel) - $(vopt_if libvpl libvpl-devel) $(vopt_if nvcodec nv-codec-headers) - $(vopt_if vaapi libva-devel)" -depends="ffplay6>=${version}_${revision}" -short_desc="Decoding, encoding and streaming software" -maintainer="Orphaned " -license="GPL-3.0-or-later" -homepage="https://www.ffmpeg.org" -changelog="https://raw.githubusercontent.com/FFmpeg/FFmpeg/master/Changelog" -distfiles="https://www.ffmpeg.org/releases/ffmpeg-${version}.tar.xz" -checksum=d4fcb164028dd3beee5d92c0ac72e46aac6973c75ea12dc14de07bf8f407370a - -build_options="vaapi vdpau fdk_aac nvcodec libvpl" -desc_option_sofa="Enable support for AES SOFA" - -case "$XBPS_TARGET_MACHINE" in - i686*) - build_options_default+=" vaapi vdpau nvcodec" - hostmakedepends+=" nasm" - ;; - x86_64*) - hostmakedepends+=" nasm" - build_options_default+=" vaapi vdpau nvcodec libvpl" - ;; - ppc64*) build_options_default+=" vaapi vdpau";; - mips*) CFLAGS="-mnan=legacy";; -esac - -_apply_patch() { - local args="$1" pname="$(basename $2)" - - if [ ! -f ".${pname}_done" ]; then - patch -N $args -i $2 - touch .${pname}_done - fi -} - -post_patch() { - case "$XBPS_TARGET_MACHINE" in - ppc64le*) ;; - ppc*) _apply_patch -p1 ${FILESDIR}/altivec.patch ;; - esac -} - -do_configure() { - # Fix gcc on x86_64-musl only - if [ "$XBPS_TARGET_MACHINE" = "x86_64-musl" ]; then - vsed -i configure -e "s;_cflags_speed='-O3';_cflags_speed='-O2';" - fi - - if [ "$CROSS_BUILD" ]; then - case "$XBPS_TARGET_MACHINE" in - arm*) _arch="arm";; - aarch64*) _arch="aarch64";; - mips*) _arch="mips";; - ppc64*) _arch="ppc64";; - ppc*) _arch="ppc";; - *) _arch="${XBPS_TARGET_MACHINE%%-musl}";; - esac - - _args+=" --enable-cross-compile - --sysroot=$XBPS_CROSS_BASE - --cross-prefix=${XBPS_CROSS_TRIPLET}- - --target-os=linux --arch=${_arch}" - fi - - case "$XBPS_TARGET_MACHINE" in - ppc|ppc-musl) _args+=" --disable-altivec";; - esac - - ./configure --prefix=/usr --disable-debug --enable-gpl --enable-gnutls \ - --disable-stripping \ - --enable-libcdio --enable-version3 --enable-runtime-cpudetect \ - --enable-libmp3lame --enable-libvorbis --enable-libxvid \ - --enable-libx264 --enable-libvpx --enable-libtheora \ - --enable-shared --enable-static --enable-libxcb \ - --enable-libpulse --enable-libfreetype --enable-libopenmpt \ - --enable-libspeex --enable-libcelt --enable-libass \ - --enable-libopus --enable-librtmp --enable-libjack \ - --disable-libopencore_amrnb --disable-libopencore_amrwb \ - --disable-libopenjpeg --enable-libbluray --enable-libsoxr \ - --enable-postproc --enable-opencl --enable-libvmaf ${_args} \ - --enable-libx265 --enable-libv4l2 --enable-libaom \ - --enable-libbs2b --enable-libvidstab --enable-libdav1d \ - --enable-libsrt --enable-librist --enable-libwebp \ - --enable-vulkan --enable-libdrm --enable-libsvtav1 \ - --enable-libfreetype --enable-libharfbuzz --enable-libfontconfig \ - --enable-libjxl \ - $(vopt_if fdk_aac '--enable-nonfree --enable-libfdk-aac') \ - $(vopt_enable vaapi) $(vopt_enable vdpau) \ - $(vopt_enable zimg libzimg) \ - $(vopt_enable sofa libmysofa) \ - $(vopt_enable libvpl libvpl) \ - $(vopt_enable nvcodec nvenc) \ - $(vopt_enable nvcodec nvdec) -} - -do_build() { - make ${makejobs} - make doc/ff{mpeg,play}.1 -} - -do_install() { - make DESTDIR=${DESTDIR} install install-man -} - -libavcodec6_package() { - short_desc="FFmpeg codec library" - pkg_install() { - vmove "usr/lib/libavcodec.so.*" - } -} - -libavdevice6_package() { - short_desc="FFmpeg device handling library" - pkg_install() { - vmove "usr/lib/libavdevice.so.*" - } -} - -libavresample6_package() { - short_desc="Package deprecated, removal needed" - metapackage=yes -} - -libavformat6_package() { - short_desc="FFmpeg file format library" - pkg_install() { - vmove "usr/lib/libavformat.so.*" - } -} - -libavutil6_package() { - short_desc="FFmpeg utility library" - pkg_install() { - vmove "usr/lib/libavutil.so.*" - } -} - -libavfilter6_package() { - short_desc="FFmpeg audio/video filter library" - pkg_install() { - vmove "usr/lib/libavfilter.so.*" - } -} - -libpostproc6_package() { - short_desc="FFmpeg video postprocessing library" - pkg_install() { - vmove "usr/lib/libpostproc.so.*" - } -} - -libswscale6_package() { - short_desc="FFmpeg video scaling library" - pkg_install() { - vmove "usr/lib/libswscale.so.*" - } -} - -libswresample6_package() { - short_desc="FFmpeg video resampling library" - pkg_install() { - vmove "usr/lib/libswresample.so.*" - } -} - -ffmpeg6-devel_package() { - depends=" - libavcodec6>=${version}_${revision} - libavdevice6>=${version}_${revision} - libavformat6>=${version}_${revision} - libavutil6>=${version}_${revision} - libavfilter6>=${version}_${revision} - libpostproc6>=${version}_${revision} - libswscale6>=${version}_${revision} - libswresample6>=${version}_${revision}" - short_desc+=" - development files" - conflicts="ffmpeg-devel" - replaces="ffmpeg-devel>=0" - case "$XBPS_TARGET_MACHINE" in - i686*) - # /usr/bin/strip: error: the input file '/destdir//ffmpeg-devel-4.4.4/usr/lib/libavfilter.a(vf_atadenoise.o)' has no sections - nostrip_files="/usr/lib/libavfilter.a";; - esac - pkg_install() { - vmove usr/include - vmove usr/lib/pkgconfig - vmove "usr/lib/*.a" - vmove "usr/lib/*.so" - vmove usr/share/ffmpeg/examples - vmove usr/share/man/man3 - } -} - -ffplay6_package() { - short_desc="Simple video player using FFmpeg and SDL2" - pkg_install() { - vmove usr/bin/ffplay - vmove "usr/share/man/man1/ffplay*" - } -} diff --git a/srcpkgs/ffplay6 b/srcpkgs/ffplay6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/ffplay6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/libavcodec6 b/srcpkgs/libavcodec6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/libavcodec6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/libavdevice6 b/srcpkgs/libavdevice6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/libavdevice6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/libavfilter6 b/srcpkgs/libavfilter6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/libavfilter6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/libavformat6 b/srcpkgs/libavformat6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/libavformat6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/libavresample6 b/srcpkgs/libavresample6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/libavresample6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/libavutil6 b/srcpkgs/libavutil6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/libavutil6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/libpostproc6 b/srcpkgs/libpostproc6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/libpostproc6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/libswresample6 b/srcpkgs/libswresample6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/libswresample6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/libswscale6 b/srcpkgs/libswscale6 deleted file mode 120000 index ccdfc6aa0e84ea..00000000000000 --- a/srcpkgs/libswscale6 +++ /dev/null @@ -1 +0,0 @@ -ffmpeg6 \ No newline at end of file diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template index 94a29c89f5e367..20384015aa0cf8 100644 --- a/srcpkgs/removed-packages/template +++ b/srcpkgs/removed-packages/template @@ -161,6 +161,9 @@ replaces=" epstopdf<=2.27_3 escrotum<=0.2.1_2 fah<=7.6.13_1 + ffmpeg6<=6.1.3_4 + ffmpeg6-devel<=6.1.3_4 + ffplay6<=6.1.3_4 fingerprint-gui<=1.09_3 flang17-devel<=17.0.6_5 flang17<=17.0.6_5 @@ -425,6 +428,12 @@ replaces=" libapp<=20140527_2 libasr-devel<=1.0.4_1 libasr<=1.0.4_1 + libavcodec6<=6.1.3_4 + libavdevice6<=6.1.3_4 + libavfilter6<=6.1.3_4 + libavformat6<=6.1.3_4 + libavresample6<=6.1.3_4 + libavutil6<=6.1.3_4 libbitcoin-blockchain-devel<=3.6.0_10 libbitcoin-blockchain<=3.6.0_10 libbitcoin-client-devel<=3.6.0_10 @@ -516,6 +525,7 @@ replaces=" libpoppler89<=0.80.0_1 libportal-qt5-devel<=0.9.1_2 libportal-qt5<=0.9.1_2 + libpostproc6<=6.1.3_4 libproxy-python3<=0.4.18_4 libproxy-python<=0.4.18_1 libpurple-hangouts<=20190606_1 @@ -537,6 +547,8 @@ replaces=" libspa-ffmpeg<=0.3.32_1 libspotify-devel<=12.1.51_2 libspotify<=12.1.51_2 + libswresample6<=6.1.3_4 + libswscale6<=6.1.3_4 libtaginfo-devel<=0.2.1_2 libtaginfo<=0.2.1_2 libtorrent-rasterbar-python<=1.2.2_1 From d90e4f1e90768722994766efdfe83354cb3780f5 Mon Sep 17 00:00:00 2001 From: zlice Date: Mon, 22 Dec 2025 17:15:35 -0500 Subject: [PATCH 002/115] ffmpeg: update to 9.0.1 --- common/shlibs | 23 ++-- srcpkgs/ffmpeg/files/altivec.patch | 60 --------- ...av_stream_get_first_dts-for-chromium.patch | 46 +++++++ .../patches/intel-media-driver-32bit.patch | 15 --- srcpkgs/ffmpeg/patches/posix-ioctl.patch | 30 +++++ srcpkgs/ffmpeg/patches/svt-av1-3.0.patch | 16 --- srcpkgs/ffmpeg/patches/v4l2-fix-glibc.patch | 17 --- srcpkgs/ffmpeg/patches/vulkan-gcc14.patch | 13 -- srcpkgs/ffmpeg/template | 127 +++++++----------- srcpkgs/libpostproc | 1 - srcpkgs/removed-packages/template | 1 + 11 files changed, 139 insertions(+), 210 deletions(-) delete mode 100644 srcpkgs/ffmpeg/files/altivec.patch create mode 100644 srcpkgs/ffmpeg/patches/add-av_stream_get_first_dts-for-chromium.patch delete mode 100644 srcpkgs/ffmpeg/patches/intel-media-driver-32bit.patch create mode 100644 srcpkgs/ffmpeg/patches/posix-ioctl.patch delete mode 100644 srcpkgs/ffmpeg/patches/svt-av1-3.0.patch delete mode 100644 srcpkgs/ffmpeg/patches/v4l2-fix-glibc.patch delete mode 100644 srcpkgs/ffmpeg/patches/vulkan-gcc14.patch delete mode 120000 srcpkgs/libpostproc diff --git a/common/shlibs b/common/shlibs index 44ace2a61369b4..77f1abff8c4f89 100644 --- a/common/shlibs +++ b/common/shlibs @@ -402,15 +402,20 @@ libImlib2.so.1 imlib2-1.4.2_1 libmp3lame.so.0 lame-3.98.2_1 libdispatch.so libdispatch-5.10.1_1 libBlocksRuntime.so libdispatch-5.10.1_1 -libavdevice.so.58 libavdevice-4.0_1 -libavformat.so.58 libavformat-4.0_1 -libswscale.so.5 libswscale-4.0_1 -libswresample.so.3 libswresample-4.0_1 -libavresample.so.4 libavresample-4.0_1 -libpostproc.so.55 libpostproc-4.0_1 -libavcodec.so.58 libavcodec-4.0_1 -libavutil.so.56 libavutil-4.0_1 -libavfilter.so.7 libavfilter-4.0_1 +libavdevice.so.62 libavdevice8-8.0.1_1 +libavformat.so.62 libavformat8-8.0.1_1 +libswscale.so.9 libswscale8-8.0.1_1 +libswresample.so.6 libswresample8-8.0.1_1 +libavcodec.so.62 libavcodec8-8.0.1_1 +libavutil.so.60 libavutil8-8.0.1_1 +libavfilter.so.11 libavfilter8-8.0.1_1 +libavdevice.so.63 libavdevice-9.0.1_1 +libavformat.so.63 libavformat-9.0.1_1 +libswscale.so.10 libswscale-9.0.1_1 +libswresample.so.7 libswresample-9.0.1_1 +libavcodec.so.63 libavcodec-9.0.1_1 +libavutil.so.61 libavutil-9.0.1_1 +libavfilter.so.12 libavfilter-9.0.1_1 libSDL-1.2.so.0 sdl12-compat-1.2.68_1 libSDL_image-1.2.so.0 SDL_image-1.2.10_1 libx264.so.165 x264-20250402.165_1 diff --git a/srcpkgs/ffmpeg/files/altivec.patch b/srcpkgs/ffmpeg/files/altivec.patch deleted file mode 100644 index 9c57200463320e..00000000000000 --- a/srcpkgs/ffmpeg/files/altivec.patch +++ /dev/null @@ -1,60 +0,0 @@ -revert some altivec specific change on all ppc* except ppc64le* - -q66: "We should also throw in a revert of FFmpeg/FFmpeg@3a557c5 but only -conditionally, for ppc* but not ppc64le* (the new code is valid for -POWER8 VSX which LE targets as a baseline but not BE)" - - -This reverts commit 3a557c5d88b7b15b5954ba2743febb055549b536. ---- - libswscale/ppc/yuv2rgb_altivec.c | 24 ++++++++++++++++++++---- - 1 file changed, 20 insertions(+), 4 deletions(-) - -diff --git a/libswscale/ppc/yuv2rgb_altivec.c b/libswscale/ppc/yuv2rgb_altivec.c -index 536545293d..c1e2852adb 100644 ---- a/libswscale/ppc/yuv2rgb_altivec.c -+++ b/libswscale/ppc/yuv2rgb_altivec.c -@@ -305,6 +305,9 @@ static int altivec_ ## name(SwsContext *c, const unsigned char **in, \ - vector signed short R1, G1, B1; \ - vector unsigned char R, G, B; \ - \ -+ const vector unsigned char *y1ivP, *y2ivP, *uivP, *vivP; \ -+ vector unsigned char align_perm; \ -+ \ - vector signed short lCY = c->CY; \ - vector signed short lOY = c->OY; \ - vector signed short lCRV = c->CRV; \ -@@ -335,13 +338,26 @@ static int altivec_ ## name(SwsContext *c, const unsigned char **in, \ - vec_dstst(oute, (0x02000002 | (((w * 3 + 32) / 32) << 16)), 1); \ - \ - for (j = 0; j < w / 16; j++) { \ -- y0 = vec_xl(0, y1i); \ -+ y1ivP = (const vector unsigned char *) y1i; \ -+ y2ivP = (const vector unsigned char *) y2i; \ -+ uivP = (const vector unsigned char *) ui; \ -+ vivP = (const vector unsigned char *) vi; \ -+ \ -+ align_perm = vec_lvsl(0, y1i); \ -+ y0 = (vector unsigned char) \ -+ vec_perm(y1ivP[0], y1ivP[1], align_perm); \ - \ -- y1 = vec_xl(0, y2i); \ -+ align_perm = vec_lvsl(0, y2i); \ -+ y1 = (vector unsigned char) \ -+ vec_perm(y2ivP[0], y2ivP[1], align_perm); \ - \ -- u = (vector signed char) vec_xl(0, ui); \ -+ align_perm = vec_lvsl(0, ui); \ -+ u = (vector signed char) \ -+ vec_perm(uivP[0], uivP[1], align_perm); \ - \ -- v = (vector signed char) vec_xl(0, vi); \ -+ align_perm = vec_lvsl(0, vi); \ -+ v = (vector signed char) \ -+ vec_perm(vivP[0], vivP[1], align_perm); \ - \ - u = (vector signed char) \ - vec_sub(u, \ --- -2.27.0 - diff --git a/srcpkgs/ffmpeg/patches/add-av_stream_get_first_dts-for-chromium.patch b/srcpkgs/ffmpeg/patches/add-av_stream_get_first_dts-for-chromium.patch new file mode 100644 index 00000000000000..351ebb24157652 --- /dev/null +++ b/srcpkgs/ffmpeg/patches/add-av_stream_get_first_dts-for-chromium.patch @@ -0,0 +1,46 @@ +Patch-Source: https://github.com/archlinux/svntogit-packages/blob/afdf00ac125851675c1599ab46545f6c58cfb655/trunk/add-av_stream_get_first_dts-for-chromium.patch +From 95aab0fd83619408995720ce53d7a74790580220 Mon Sep 17 00:00:00 2001 +From: "liberato@chromium.org" +Date: Wed, 7 Jul 2021 19:01:22 -0700 +Subject: [PATCH] Add av_stream_get_first_dts for Chromium + +[foutrelis: adjust for new FFStream struct replacing AVStreamInternal] +--- + libavformat/avformat.h | 4 ++++ + libavformat/utils.c | 7 +++++++ + 2 files changed, 11 insertions(+) + +diff --git a/libavformat/avformat.h b/libavformat/avformat.h +index 56c1c80..75221d9 100644 +--- a/libavformat/avformat.h ++++ b/libavformat/avformat.h +@@ -1202,6 +1202,10 @@ typedef struct AVStreamGroup { + + struct AVCodecParserContext *av_stream_get_parser(const AVStream *s); + ++// Chromium: We use the internal field first_dts vvv ++int64_t av_stream_get_first_dts(const AVStream *st); ++// Chromium: We use the internal field first_dts ^^^ ++ + #define AV_PROGRAM_RUNNING 1 + + /** +diff --git a/libavformat/demux_utils.c b/libavformat/demux_utils.c +index 86f5512..8b535a8 100644 +--- a/libavformat/demux_utils.c ++++ b/libavformat/demux_utils.c +@@ -29,6 +29,13 @@ + #include "demux.h" + #include "internal.h" + ++// Chromium: We use the internal field first_dts vvv ++int64_t av_stream_get_first_dts(const AVStream *st) ++{ ++ return cffstream(st)->first_dts; ++} ++// Chromium: We use the internal field first_dts ^^^ ++ + struct AVCodecParserContext *av_stream_get_parser(const AVStream *st) + { + return cffstream(st)->parser; + diff --git a/srcpkgs/ffmpeg/patches/intel-media-driver-32bit.patch b/srcpkgs/ffmpeg/patches/intel-media-driver-32bit.patch deleted file mode 100644 index 567169f0e4afae..00000000000000 --- a/srcpkgs/ffmpeg/patches/intel-media-driver-32bit.patch +++ /dev/null @@ -1,15 +0,0 @@ -Fix type to be consistent with intel-media-driver - -diff -rup libavutil/hwcontext_vaapi.c.orig libavutil/hwcontext_vaapi.c ---- a/libavutil/hwcontext_vaapi.c -+++ b/libavutil/hwcontext_vaapi.c -@@ -1032,7 +1032,7 @@ static int vaapi_map_from_drm(AVHWFrames - uint32_t va_fourcc; - int err, i, j, k; - -- unsigned long buffer_handle; -+ uintptr_t buffer_handle; - VASurfaceAttribExternalBuffers buffer_desc; - VASurfaceAttrib attrs[2] = { - { - diff --git a/srcpkgs/ffmpeg/patches/posix-ioctl.patch b/srcpkgs/ffmpeg/patches/posix-ioctl.patch new file mode 100644 index 00000000000000..1ce4076fcfdb03 --- /dev/null +++ b/srcpkgs/ffmpeg/patches/posix-ioctl.patch @@ -0,0 +1,30 @@ +commit 6408745f54ada32bad44227e6b4173e46641afaa +Author: q66 +Date: Tue Nov 11 18:12:01 2025 +0100 + fix posix ioctl on musl + + The libv4l2 is built with posix ioctl but to make it known to + the header the macro needs to be defined which is unfortunate. + + ffmpeg had it work for a while but then it broke when this + commit was introduced: + + https://github.com/FFmpeg/FFmpeg/commit/5fea5e3e11d6ff425db48f44489916399822aece + + due to the macro previously being accidentally defined + +zlice - original was LIBV4L_HAVE_POSIX_IOCTL - which is not in libv4l2.h +diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c +index c38ecbb..3457b43 100644 +--- a/libavdevice/v4l2.c ++++ b/libavdevice/v4l2.c +@@ -49,6 +49,9 @@ + #include + + #if CONFIG_LIBV4L2 ++#if HAVE_IOCTL_POSIX ++#define HAVE_POSIX_IOCTL ++#endif + #include + #endif + diff --git a/srcpkgs/ffmpeg/patches/svt-av1-3.0.patch b/srcpkgs/ffmpeg/patches/svt-av1-3.0.patch deleted file mode 100644 index 6ada631ab692bb..00000000000000 --- a/srcpkgs/ffmpeg/patches/svt-av1-3.0.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c -index 79b28eb4df546..43fe531fde74d 100644 ---- a/libavcodec/libsvtav1.c -+++ b/libavcodec/libsvtav1.c -@@ -435,7 +435,11 @@ static av_cold int eb_enc_init(AVCodecContext *avctx) - - svt_enc->eos_flag = EOS_NOT_REACHED; - -+#if SVT_AV1_CHECK_VERSION(3, 0, 0) -+ svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, &svt_enc->enc_params); -+#else - svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, svt_enc, &svt_enc->enc_params); -+#endif - if (svt_ret != EB_ErrorNone) { - return svt_print_error(avctx, svt_ret, "Error initializing encoder handle"); - } diff --git a/srcpkgs/ffmpeg/patches/v4l2-fix-glibc.patch b/srcpkgs/ffmpeg/patches/v4l2-fix-glibc.patch deleted file mode 100644 index e4c9b1eb6c8f5b..00000000000000 --- a/srcpkgs/ffmpeg/patches/v4l2-fix-glibc.patch +++ /dev/null @@ -1,17 +0,0 @@ -libv4l2.h uses #ifdef, not #if - -diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c -index 42d4b97c8f701..0ae68723382f4 100644 ---- a/libavdevice/v4l2.c -+++ b/libavdevice/v4l2.c -@@ -47,6 +47,10 @@ - #include "v4l2-common.h" - #include - -+#if ! HAVE_POSIX_IOCTL -+#undef HAVE_POSIX_IOCTL -+#endif -+ - #if CONFIG_LIBV4L2 - #include - #endif diff --git a/srcpkgs/ffmpeg/patches/vulkan-gcc14.patch b/srcpkgs/ffmpeg/patches/vulkan-gcc14.patch deleted file mode 100644 index d8da6251db05f7..00000000000000 --- a/srcpkgs/ffmpeg/patches/vulkan-gcc14.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -rup libavutil/hwcontext_vulkan.c.orig libavutil/hwcontext_vulkan.c ---- a/libavutil/hwcontext_vulkan.c -+++ b/libavutil/hwcontext_vulkan.c -@@ -862,7 +862,7 @@ static void free_exec_ctx(AVHWFramesCont - - av_freep(&cmd->queues); - av_freep(&cmd->bufs); -- cmd->pool = NULL; -+ cmd->pool = VK_NULL_HANDLE; - } - - static VkCommandBuffer get_buf_exec_ctx(AVHWFramesContext *hwfc, VulkanExecCtx *cmd) - diff --git a/srcpkgs/ffmpeg/template b/srcpkgs/ffmpeg/template index bbc2f80457fb11..b5c5b9f9764267 100644 --- a/srcpkgs/ffmpeg/template +++ b/srcpkgs/ffmpeg/template @@ -1,50 +1,40 @@ # Template file for 'ffmpeg' # audacity also needs to be bumped when a new ffmpeg version bumps libavformat's soname! pkgname=ffmpeg -version=4.4.8 +version=9.0.1 revision=1 -metapackage=yes hostmakedepends="pkg-config perl" makedepends="zlib-devel bzip2-devel freetype-devel alsa-lib-devel libXfixes-devel libXext-devel libXvMC-devel libxcb-devel lame-devel libtheora-devel - libvorbis-devel x264-devel xvidcore-devel jack-devel SDL2-devel - libcdio-paranoia-devel librtmp-devel libmodplug-devel gnutls-devel + libvorbis-devel x264-devel xvidcore-devel jack-devel SDL2-devel libsoxr-devel + libcdio-paranoia-devel librtmp-devel libopenmpt-devel gnutls-devel speex-devel celt-devel harfbuzz-devel libass-devel opus-devel ocl-icd-devel - libbs2b-devel libvidstab-devel libbluray-devel - $(vopt_if pulseaudio pulseaudio-devel) - $(vopt_if vaapi libva-devel) $(vopt_if vdpau libvdpau-devel) - $(vopt_if x265 x265-devel) $(vopt_if v4l2 v4l-utils-devel) - $(vopt_if fdk_aac fdk-aac-devel) $(vopt_if vpx libvpx-devel) - $(vopt_if aom libaom-devel) $(vopt_if sndio sndio-devel) - $(vopt_if dav1d libdav1d-devel) $(vopt_if zimg zimg-devel) - $(vopt_if webp libwebp-devel) $(vopt_if sofa libmysofa-devel) - $(vopt_if drm libdrm-devel) libsvt-av1-devel - $(vopt_if srt srt-devel) $(vopt_if rist librist-devel) - $(vopt_if vulkan 'vulkan-loader-devel') - $(vopt_if nvenc nv-codec-headers12.0) $(vopt_if nvdec nv-codec-headers12.0)" -# ffmpeg6 provides ffmpeg, ffprobe, ffplay, etc -depends="ffmpeg6" -short_desc="Decoding, encoding and streaming software (transitional dummy package)" + libbs2b-devel libvidstab-devel vmaf-devel libbluray-devel pulseaudio-devel + x265-devel v4l-utils-devel libvpx-devel libaom-devel libdav1d-devel libjxl-devel + libwebp-devel libdrm-devel srt-devel librist-devel vulkan-loader-devel + zimg-devel libmysofa-devel libsvt-av1-devel $(vopt_if vaapi libva-devel) + $(vopt_if vdpau libvdpau-devel) $(vopt_if fdk_aac fdk-aac-devel) + $(vopt_if libvpl libvpl-devel) $(vopt_if nvcodec nv-codec-headers)" +depends="ffplay>=${version}_${revision}" +short_desc="Decoding, encoding and streaming software" maintainer="Orphaned " license="GPL-3.0-or-later" homepage="https://www.ffmpeg.org" changelog="https://raw.githubusercontent.com/FFmpeg/FFmpeg/master/Changelog" distfiles="https://www.ffmpeg.org/releases/ffmpeg-${version}.tar.xz" -checksum=c73848c4ae283d9eaee7be3b276affbc3543380483555500d0dd2c9b7e1c39c3 +checksum=cf38e0e28c7e5605942c4a77755349b0145804a397af37eb1fb4c77cb237f635 -build_options="x265 v4l2 vaapi vdpau vpx fdk_aac aom nvenc sndio pulseaudio - dav1d zimg webp sofa vulkan drm srt rist nvdec" -build_options_default="x265 v4l2 vpx aom sndio pulseaudio dav1d webp vulkan drm srt rist" - -desc_option_srt="Enable support for SRT (Secure, Reliable, Transport)" -desc_option_rist="Enable support for RIST (Reliable Internet Stream Transport)" +build_options="vaapi vdpau fdk_aac nvcodec libvpl" desc_option_sofa="Enable support for AES SOFA" -desc_option_webp="Enable support for WebP" case "$XBPS_TARGET_MACHINE" in - i686*|x86_64*) + i686*) + build_options_default+=" vaapi vdpau nvcodec" + hostmakedepends+=" nasm" + ;; + x86_64*) hostmakedepends+=" nasm" - build_options_default+=" vaapi vdpau nvenc nvdec" + build_options_default+=" vaapi vdpau nvcodec libvpl" ;; ppc64*) build_options_default+=" vaapi vdpau";; mips*) CFLAGS="-mnan=legacy";; @@ -92,51 +82,40 @@ do_configure() { ppc|ppc-musl) _args+=" --disable-altivec";; esac - if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then - _args+=" --extra-libs=-latomic" - fi - ./configure --prefix=/usr --disable-debug --enable-gpl --enable-gnutls \ --disable-stripping \ --enable-libcdio --enable-version3 --enable-runtime-cpudetect \ --enable-libmp3lame --enable-libvorbis --enable-libxvid \ - --enable-libx264 $(vopt_enable vpx libvpx) --enable-libtheora \ + --enable-libx264 --enable-libvpx --enable-libtheora \ --enable-shared --enable-static --enable-libxcb \ - $(vopt_enable pulseaudio libpulse) --enable-libfreetype --enable-libmodplug \ - --enable-libspeex --enable-libcelt --enable-libass \ + --enable-libpulse --enable-libfreetype --enable-libopenmpt \ + --enable-libspeex --enable-libass \ --enable-libopus --enable-librtmp --enable-libjack \ - $(vopt_if fdk_aac '--enable-nonfree --enable-libfdk-aac') \ --disable-libopencore_amrnb --disable-libopencore_amrwb \ - --disable-libopenjpeg --enable-libbluray --enable-libsvtav1 \ - --enable-postproc --enable-opencl --disable-libvmaf ${_args} \ - $(vopt_enable x265 libx265) \ - $(vopt_enable v4l2 libv4l2) \ - $(vopt_enable aom libaom) $(vopt_enable vaapi) $(vopt_enable vdpau) \ - --enable-libbs2b --enable-avresample --enable-libvidstab \ - $(vopt_enable dav1d libdav1d) \ + --disable-libopenjpeg --enable-libbluray --enable-libsoxr \ + --enable-opencl --enable-libvmaf ${_args} \ + --enable-libx265 --enable-libv4l2 --enable-libaom \ + --enable-libbs2b --enable-libvidstab --enable-libdav1d \ + --enable-libsrt --enable-librist --enable-libwebp \ + --enable-vulkan --enable-libdrm --enable-libsvtav1 \ + --enable-libfreetype --enable-libharfbuzz --enable-libfontconfig \ + --enable-libjxl \ + $(vopt_if fdk_aac '--enable-nonfree --enable-libfdk-aac') \ + $(vopt_enable vaapi) $(vopt_enable vdpau) \ $(vopt_enable zimg libzimg) \ - $(vopt_enable webp libwebp) \ $(vopt_enable sofa libmysofa) \ - $(vopt_enable vulkan) \ - $(vopt_enable drm libdrm) \ - $(vopt_enable srt libsrt) \ - $(vopt_enable rist librist) \ - $(vopt_if nvenc '--enable-nvenc') \ - $(vopt_if nvdec '--enable-nvdec') + $(vopt_enable libvpl libvpl) \ + $(vopt_enable nvcodec nvenc) \ + $(vopt_enable nvcodec nvdec) } do_build() { make ${makejobs} + make doc/ff{mpeg,play}.1 } -# transitional dummy package for ffmpeg6 -# binaries conflict with 6 do_install() { - make DESTDIR=${DESTDIR} install - rm -rf ${DESTDIR}/usr/bin - rm -rf ${DESTDIR}/usr/share/man/man1 - rm -rf ${DESTDIR}/usr/share/ffmpeg/ffprobe.xsd - rm -rf ${DESTDIR}/usr/share/ffmpeg/libvpx*ffpreset + make DESTDIR=${DESTDIR} install install-man } libavcodec_package() { @@ -154,10 +133,8 @@ libavdevice_package() { } libavresample_package() { - short_desc="FFmpeg audio resampling library" - pkg_install() { - vmove "usr/lib/libavresample.so.*" - } + short_desc="Package deprecated, removal needed" + metapackage=yes } libavformat_package() { @@ -181,13 +158,6 @@ libavfilter_package() { } } -libpostproc_package() { - short_desc="FFmpeg video postprocessing library" - pkg_install() { - vmove "usr/lib/libpostproc.so.*" - } -} - libswscale_package() { short_desc="FFmpeg video scaling library" pkg_install() { @@ -209,19 +179,16 @@ ffmpeg-devel_package() { libavformat>=${version}_${revision} libavutil>=${version}_${revision} libavfilter>=${version}_${revision} - libpostproc>=${version}_${revision} libswscale>=${version}_${revision} - libswresample>=${version}_${revision} - libavresample>=${version}_${revision}" - short_desc="Decoding, encoding and streaming software - development files" - conflicts="ffmpeg6-devel" - replaces="ffmpeg6-devel>=0" + libswresample>=${version}_${revision}" + short_desc+=" - development files" + conflicts="ffmpeg-devel" + replaces="ffmpeg-devel>=0" case "$XBPS_TARGET_MACHINE" in i686*) # /usr/bin/strip: error: the input file '/destdir//ffmpeg-devel-4.4.4/usr/lib/libavfilter.a(vf_atadenoise.o)' has no sections nostrip_files="/usr/lib/libavfilter.a";; esac - pkg_install() { vmove usr/include vmove usr/lib/pkgconfig @@ -233,7 +200,9 @@ ffmpeg-devel_package() { } ffplay_package() { - short_desc="Simple video player using FFmpeg and SDL2 (transitional dummy package)" - metapackage=yes - depends="ffplay6" + short_desc="Simple video player using FFmpeg and SDL2" + pkg_install() { + vmove usr/bin/ffplay + vmove "usr/share/man/man1/ffplay*" + } } diff --git a/srcpkgs/libpostproc b/srcpkgs/libpostproc deleted file mode 120000 index a9f1eea092d5e9..00000000000000 --- a/srcpkgs/libpostproc +++ /dev/null @@ -1 +0,0 @@ -ffmpeg \ No newline at end of file diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template index 20384015aa0cf8..d644ca959f0932 100644 --- a/srcpkgs/removed-packages/template +++ b/srcpkgs/removed-packages/template @@ -525,6 +525,7 @@ replaces=" libpoppler89<=0.80.0_1 libportal-qt5-devel<=0.9.1_2 libportal-qt5<=0.9.1_2 + libpostproc<=4.4.6_3 libpostproc6<=6.1.3_4 libproxy-python3<=0.4.18_4 libproxy-python<=0.4.18_1 From 70d6ab383fc37a7dec984fc67618a9850390d594 Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 2 Sep 2026 17:03:25 -0400 Subject: [PATCH 003/115] New package: ffmpeg8-8.1.2 --- srcpkgs/ffmpeg8-devel | 1 + ...av_stream_get_first_dts-for-chromium.patch | 46 ++++ srcpkgs/ffmpeg8/patches/posix-ioctl.patch | 30 +++ srcpkgs/ffmpeg8/template | 208 ++++++++++++++++++ srcpkgs/libavcodec8 | 1 + srcpkgs/libavdevice8 | 1 + srcpkgs/libavfilter8 | 1 + srcpkgs/libavformat8 | 1 + srcpkgs/libavresample8 | 1 + srcpkgs/libavutil8 | 1 + srcpkgs/libswresample8 | 1 + srcpkgs/libswscale8 | 1 + 12 files changed, 293 insertions(+) create mode 120000 srcpkgs/ffmpeg8-devel create mode 100644 srcpkgs/ffmpeg8/patches/add-av_stream_get_first_dts-for-chromium.patch create mode 100644 srcpkgs/ffmpeg8/patches/posix-ioctl.patch create mode 100644 srcpkgs/ffmpeg8/template create mode 120000 srcpkgs/libavcodec8 create mode 120000 srcpkgs/libavdevice8 create mode 120000 srcpkgs/libavfilter8 create mode 120000 srcpkgs/libavformat8 create mode 120000 srcpkgs/libavresample8 create mode 120000 srcpkgs/libavutil8 create mode 120000 srcpkgs/libswresample8 create mode 120000 srcpkgs/libswscale8 diff --git a/srcpkgs/ffmpeg8-devel b/srcpkgs/ffmpeg8-devel new file mode 120000 index 00000000000000..f2174369945d2d --- /dev/null +++ b/srcpkgs/ffmpeg8-devel @@ -0,0 +1 @@ +ffmpeg8 \ No newline at end of file diff --git a/srcpkgs/ffmpeg8/patches/add-av_stream_get_first_dts-for-chromium.patch b/srcpkgs/ffmpeg8/patches/add-av_stream_get_first_dts-for-chromium.patch new file mode 100644 index 00000000000000..351ebb24157652 --- /dev/null +++ b/srcpkgs/ffmpeg8/patches/add-av_stream_get_first_dts-for-chromium.patch @@ -0,0 +1,46 @@ +Patch-Source: https://github.com/archlinux/svntogit-packages/blob/afdf00ac125851675c1599ab46545f6c58cfb655/trunk/add-av_stream_get_first_dts-for-chromium.patch +From 95aab0fd83619408995720ce53d7a74790580220 Mon Sep 17 00:00:00 2001 +From: "liberato@chromium.org" +Date: Wed, 7 Jul 2021 19:01:22 -0700 +Subject: [PATCH] Add av_stream_get_first_dts for Chromium + +[foutrelis: adjust for new FFStream struct replacing AVStreamInternal] +--- + libavformat/avformat.h | 4 ++++ + libavformat/utils.c | 7 +++++++ + 2 files changed, 11 insertions(+) + +diff --git a/libavformat/avformat.h b/libavformat/avformat.h +index 56c1c80..75221d9 100644 +--- a/libavformat/avformat.h ++++ b/libavformat/avformat.h +@@ -1202,6 +1202,10 @@ typedef struct AVStreamGroup { + + struct AVCodecParserContext *av_stream_get_parser(const AVStream *s); + ++// Chromium: We use the internal field first_dts vvv ++int64_t av_stream_get_first_dts(const AVStream *st); ++// Chromium: We use the internal field first_dts ^^^ ++ + #define AV_PROGRAM_RUNNING 1 + + /** +diff --git a/libavformat/demux_utils.c b/libavformat/demux_utils.c +index 86f5512..8b535a8 100644 +--- a/libavformat/demux_utils.c ++++ b/libavformat/demux_utils.c +@@ -29,6 +29,13 @@ + #include "demux.h" + #include "internal.h" + ++// Chromium: We use the internal field first_dts vvv ++int64_t av_stream_get_first_dts(const AVStream *st) ++{ ++ return cffstream(st)->first_dts; ++} ++// Chromium: We use the internal field first_dts ^^^ ++ + struct AVCodecParserContext *av_stream_get_parser(const AVStream *st) + { + return cffstream(st)->parser; + diff --git a/srcpkgs/ffmpeg8/patches/posix-ioctl.patch b/srcpkgs/ffmpeg8/patches/posix-ioctl.patch new file mode 100644 index 00000000000000..1ce4076fcfdb03 --- /dev/null +++ b/srcpkgs/ffmpeg8/patches/posix-ioctl.patch @@ -0,0 +1,30 @@ +commit 6408745f54ada32bad44227e6b4173e46641afaa +Author: q66 +Date: Tue Nov 11 18:12:01 2025 +0100 + fix posix ioctl on musl + + The libv4l2 is built with posix ioctl but to make it known to + the header the macro needs to be defined which is unfortunate. + + ffmpeg had it work for a while but then it broke when this + commit was introduced: + + https://github.com/FFmpeg/FFmpeg/commit/5fea5e3e11d6ff425db48f44489916399822aece + + due to the macro previously being accidentally defined + +zlice - original was LIBV4L_HAVE_POSIX_IOCTL - which is not in libv4l2.h +diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c +index c38ecbb..3457b43 100644 +--- a/libavdevice/v4l2.c ++++ b/libavdevice/v4l2.c +@@ -49,6 +49,9 @@ + #include + + #if CONFIG_LIBV4L2 ++#if HAVE_IOCTL_POSIX ++#define HAVE_POSIX_IOCTL ++#endif + #include + #endif + diff --git a/srcpkgs/ffmpeg8/template b/srcpkgs/ffmpeg8/template new file mode 100644 index 00000000000000..265e8c4c34df72 --- /dev/null +++ b/srcpkgs/ffmpeg8/template @@ -0,0 +1,208 @@ +# Template file for 'ffmpeg8' +# audacity also needs to be bumped when a new ffmpeg version bumps libavformat's soname! +pkgname=ffmpeg8 +version=8.1.2 +revision=1 +metapackage=yes +hostmakedepends="pkg-config perl" +makedepends="zlib-devel bzip2-devel freetype-devel alsa-lib-devel libXfixes-devel + libXext-devel libXvMC-devel libxcb-devel lame-devel libtheora-devel + libvorbis-devel x264-devel xvidcore-devel jack-devel SDL2-devel libsoxr-devel + libcdio-paranoia-devel librtmp-devel libopenmpt-devel gnutls-devel + speex-devel celt-devel harfbuzz-devel libass-devel opus-devel ocl-icd-devel + libbs2b-devel libvidstab-devel vmaf-devel libbluray-devel pulseaudio-devel + x265-devel v4l-utils-devel libvpx-devel libaom-devel libdav1d-devel libjxl-devel + libwebp-devel libdrm-devel srt-devel librist-devel vulkan-loader-devel + zimg-devel libmysofa-devel libsvt-av1-devel $(vopt_if vaapi libva-devel) + $(vopt_if vdpau libvdpau-devel) $(vopt_if fdk_aac fdk-aac-devel) + $(vopt_if libvpl libvpl-devel) $(vopt_if nvcodec nv-codec-headers)" +# ffmpeg provides ffmpeg, ffprobe, ffplay, etc +depends="ffmpeg" +short_desc="Decoding, encoding and streaming software" +maintainer="Orphaned " +license="GPL-3.0-or-later" +homepage="https://www.ffmpeg.org" +changelog="https://raw.githubusercontent.com/FFmpeg/FFmpeg/master/Changelog" +distfiles="https://www.ffmpeg.org/releases/ffmpeg-${version}.tar.xz" +checksum=464beb5e7bf0c311e68b45ae2f04e9cc2af88851abb4082231742a74d97b524c + +build_options="vaapi vdpau fdk_aac nvcodec libvpl" +desc_option_sofa="Enable support for AES SOFA" + +case "$XBPS_TARGET_MACHINE" in + i686*) + build_options_default+=" vaapi vdpau nvcodec" + hostmakedepends+=" nasm" + ;; + x86_64*) + hostmakedepends+=" nasm" + build_options_default+=" vaapi vdpau nvcodec libvpl" + ;; + ppc64*) build_options_default+=" vaapi vdpau";; + mips*) CFLAGS="-mnan=legacy";; +esac + +_apply_patch() { + local args="$1" pname="$(basename $2)" + + if [ ! -f ".${pname}_done" ]; then + patch -N $args -i $2 + touch .${pname}_done + fi +} + +post_patch() { + case "$XBPS_TARGET_MACHINE" in + ppc64le*) ;; + ppc*) _apply_patch -p1 ${FILESDIR}/altivec.patch ;; + esac +} + +do_configure() { + # Fix gcc on x86_64-musl only + if [ "$XBPS_TARGET_MACHINE" = "x86_64-musl" ]; then + vsed -i configure -e "s;_cflags_speed='-O3';_cflags_speed='-O2';" + fi + + if [ "$CROSS_BUILD" ]; then + case "$XBPS_TARGET_MACHINE" in + arm*) _arch="arm";; + aarch64*) _arch="aarch64";; + mips*) _arch="mips";; + ppc64*) _arch="ppc64";; + ppc*) _arch="ppc";; + *) _arch="${XBPS_TARGET_MACHINE%%-musl}";; + esac + + _args+=" --enable-cross-compile + --sysroot=$XBPS_CROSS_BASE + --cross-prefix=${XBPS_CROSS_TRIPLET}- + --target-os=linux --arch=${_arch}" + fi + + case "$XBPS_TARGET_MACHINE" in + ppc|ppc-musl) _args+=" --disable-altivec";; + esac + + ./configure --prefix=/usr --disable-debug --enable-gpl --enable-gnutls \ + --disable-stripping \ + --enable-libcdio --enable-version3 --enable-runtime-cpudetect \ + --enable-libmp3lame --enable-libvorbis --enable-libxvid \ + --enable-libx264 --enable-libvpx --enable-libtheora \ + --enable-shared --enable-static --enable-libxcb \ + --enable-libpulse --enable-libfreetype --enable-libopenmpt \ + --enable-libspeex --enable-libcelt --enable-libass \ + --enable-libopus --enable-librtmp --enable-libjack \ + --disable-libopencore_amrnb --disable-libopencore_amrwb \ + --disable-libopenjpeg --enable-libbluray --enable-libsoxr \ + --enable-opencl --enable-libvmaf ${_args} \ + --enable-libx265 --enable-libv4l2 --enable-libaom \ + --enable-libbs2b --enable-libvidstab --enable-libdav1d \ + --enable-libsrt --enable-librist --enable-libwebp \ + --enable-vulkan --enable-libdrm --enable-libsvtav1 \ + --enable-libfreetype --enable-libharfbuzz --enable-libfontconfig \ + --enable-libjxl \ + $(vopt_if fdk_aac '--enable-nonfree --enable-libfdk-aac') \ + $(vopt_enable vaapi) $(vopt_enable vdpau) \ + $(vopt_enable zimg libzimg) \ + $(vopt_enable sofa libmysofa) \ + $(vopt_enable libvpl libvpl) \ + $(vopt_enable nvcodec nvenc) \ + $(vopt_enable nvcodec nvdec) +} + +do_build() { + make ${makejobs} + make doc/ff{mpeg,play}.1 +} + +# transitional dummy package for ffmpeg(9) +# binaries conflict with 9 +do_install() { + make DESTDIR=${DESTDIR} install install-man + rm -rf ${DESTDIR}/usr/bin + rm -rf ${DESTDIR}/usr/share/man/man1 + rm -rf ${DESTDIR}/usr/share/ffmpeg/ffprobe.xsd + rm -rf ${DESTDIR}/usr/share/ffmpeg/libvpx*ffpreset +} + +libavcodec8_package() { + short_desc="FFmpeg codec library" + pkg_install() { + vmove "usr/lib/libavcodec.so.*" + } +} + +libavdevice8_package() { + short_desc="FFmpeg device handling library" + pkg_install() { + vmove "usr/lib/libavdevice.so.*" + } +} + +libavresample8_package() { + short_desc="Package deprecated, removal needed" + metapackage=yes +} + +libavformat8_package() { + short_desc="FFmpeg file format library" + pkg_install() { + vmove "usr/lib/libavformat.so.*" + } +} + +libavutil8_package() { + short_desc="FFmpeg utility library" + pkg_install() { + vmove "usr/lib/libavutil.so.*" + } +} + +libavfilter8_package() { + short_desc="FFmpeg audio/video filter library" + pkg_install() { + vmove "usr/lib/libavfilter.so.*" + } +} + +libswscale8_package() { + short_desc="FFmpeg video scaling library" + pkg_install() { + vmove "usr/lib/libswscale.so.*" + } +} + +libswresample8_package() { + short_desc="FFmpeg video resampling library" + pkg_install() { + vmove "usr/lib/libswresample.so.*" + } +} + +ffmpeg8-devel_package() { + depends=" + libavcodec8>=${version}_${revision} + libavdevice8>=${version}_${revision} + libavformat8>=${version}_${revision} + libavutil8>=${version}_${revision} + libavfilter8>=${version}_${revision} + libswscale8>=${version}_${revision} + libswresample8>=${version}_${revision}" + short_desc+=" - development files" + conflicts="ffmpeg-devel" + replaces="ffmpeg-devel>=0" + case "$XBPS_TARGET_MACHINE" in + i686*) + # /usr/bin/strip: error: the input file '/destdir//ffmpeg-devel-4.4.4/usr/lib/libavfilter.a(vf_atadenoise.o)' has no sections + nostrip_files="/usr/lib/libavfilter.a";; + esac + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + vmove usr/share/ffmpeg/examples + vmove usr/share/man/man3 + } +} diff --git a/srcpkgs/libavcodec8 b/srcpkgs/libavcodec8 new file mode 120000 index 00000000000000..f2174369945d2d --- /dev/null +++ b/srcpkgs/libavcodec8 @@ -0,0 +1 @@ +ffmpeg8 \ No newline at end of file diff --git a/srcpkgs/libavdevice8 b/srcpkgs/libavdevice8 new file mode 120000 index 00000000000000..f2174369945d2d --- /dev/null +++ b/srcpkgs/libavdevice8 @@ -0,0 +1 @@ +ffmpeg8 \ No newline at end of file diff --git a/srcpkgs/libavfilter8 b/srcpkgs/libavfilter8 new file mode 120000 index 00000000000000..f2174369945d2d --- /dev/null +++ b/srcpkgs/libavfilter8 @@ -0,0 +1 @@ +ffmpeg8 \ No newline at end of file diff --git a/srcpkgs/libavformat8 b/srcpkgs/libavformat8 new file mode 120000 index 00000000000000..f2174369945d2d --- /dev/null +++ b/srcpkgs/libavformat8 @@ -0,0 +1 @@ +ffmpeg8 \ No newline at end of file diff --git a/srcpkgs/libavresample8 b/srcpkgs/libavresample8 new file mode 120000 index 00000000000000..f2174369945d2d --- /dev/null +++ b/srcpkgs/libavresample8 @@ -0,0 +1 @@ +ffmpeg8 \ No newline at end of file diff --git a/srcpkgs/libavutil8 b/srcpkgs/libavutil8 new file mode 120000 index 00000000000000..f2174369945d2d --- /dev/null +++ b/srcpkgs/libavutil8 @@ -0,0 +1 @@ +ffmpeg8 \ No newline at end of file diff --git a/srcpkgs/libswresample8 b/srcpkgs/libswresample8 new file mode 120000 index 00000000000000..f2174369945d2d --- /dev/null +++ b/srcpkgs/libswresample8 @@ -0,0 +1 @@ +ffmpeg8 \ No newline at end of file diff --git a/srcpkgs/libswscale8 b/srcpkgs/libswscale8 new file mode 120000 index 00000000000000..f2174369945d2d --- /dev/null +++ b/srcpkgs/libswscale8 @@ -0,0 +1 @@ +ffmpeg8 \ No newline at end of file From 3b420d06630c5f2cb225d329ed8e6bbf0c6111b7 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 004/115] libopenal: revbump for ffmpeg9 --- srcpkgs/libopenal/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/libopenal/template b/srcpkgs/libopenal/template index 1728c0f4baf963..4139695549a415 100644 --- a/srcpkgs/libopenal/template +++ b/srcpkgs/libopenal/template @@ -1,11 +1,11 @@ # Template file for 'libopenal' pkgname=libopenal version=1.25.2 -revision=1 +revision=2 build_style=cmake configure_args="-DALSOFT_EXAMPLES=OFF" hostmakedepends="pkg-config" -makedepends="zlib-devel alsa-lib-devel pulseaudio-devel SDL2-devel ffmpeg6-devel +makedepends="zlib-devel alsa-lib-devel pulseaudio-devel SDL2-devel ffmpeg-devel jack-devel $(vopt_if sndio sndio-devel)" short_desc="Cross-platform 3D audio library" maintainer="Orphaned " From e67cc69840eab68699eb63b3e4ebabbe5d59b728 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 005/115] mlt7: revbump for ffmpeg9 --- srcpkgs/mlt7/patches/ffmpeg9.patch | 149 +++++++++++++++++++++++++++++ srcpkgs/mlt7/template | 4 +- 2 files changed, 151 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/mlt7/patches/ffmpeg9.patch diff --git a/srcpkgs/mlt7/patches/ffmpeg9.patch b/srcpkgs/mlt7/patches/ffmpeg9.patch new file mode 100644 index 00000000000000..3271987ce44ecd --- /dev/null +++ b/srcpkgs/mlt7/patches/ffmpeg9.patch @@ -0,0 +1,149 @@ +# https://github.com/OpenMandrivaAssociation/mlt/blob/master/mlt-7.40.0-ffmpeg9.patch +diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c +index d5ab5f1cd..cebd89f0e 100644 +--- a/src/modules/avformat/consumer_avformat.c ++++ b/src/modules/avformat/consumer_avformat.c +@@ -629,7 +629,8 @@ static void apply_properties(void *obj, mlt_properties properties, int flags) + || (opt_name[0] == 'a' && (flags & AV_OPT_FLAG_AUDIO_PARAM)))) + opt = av_opt_find(obj, ++opt_name, NULL, flags, search_flags); + // Apply option if found +- if (opt && strcmp(opt_name, "channel_layout") && strcmp(opt_name, "frame_duration")) ++ if (opt && strcmp(opt_name, "channel_layout") && strcmp(opt_name, "frame_duration") ++ && strcmp(opt_name, "dc")) + av_opt_set(obj, opt_name, mlt_properties_get_value(properties, i), search_flags); + } + } +@@ -680,7 +681,6 @@ static int pick_sample_fmt(mlt_properties properties, const AVCodec *codec) + { + int sample_fmt = AV_SAMPLE_FMT_S16; + const char *format = mlt_properties_get(properties, "mlt_audio_format"); +- const int *p = codec->sample_fmts; + const char *sample_fmt_str = mlt_properties_get(properties, "sample_fmt"); + + if (sample_fmt_str) +@@ -699,13 +699,29 @@ static int pick_sample_fmt(mlt_properties properties, const AVCodec *codec) + else if (!strcmp(format, "float")) + sample_fmt = AV_SAMPLE_FMT_FLTP; + } ++#if LIBAVCODEC_VERSION_INT >= ((61 << 16) + (13 << 8) + 100) ++ const enum AVSampleFormat *sample_fmts = NULL; ++ avcodec_get_supported_config(NULL, ++ codec, ++ AV_CODEC_CONFIG_SAMPLE_FORMAT, ++ 0, ++ (const void **) &sample_fmts, ++ NULL); ++ const int *p = (const int *) sample_fmts; ++#else ++ const int *p = codec->sample_fmts; ++#endif + // check if codec supports our mlt_audio_format +- for (; *p != -1; p++) { ++ for (; p && *p != -1; p++) { + if (*p == sample_fmt) + return sample_fmt; + } + // no match - pick first one we support ++#if LIBAVCODEC_VERSION_INT >= ((61 << 16) + (13 << 8) + 100) ++ for (p = (const int *) sample_fmts; p && *p != -1; p++) { ++#else + for (p = codec->sample_fmts; *p != -1; p++) { ++#endif + switch (*p) { + case AV_SAMPLE_FMT_U8: + case AV_SAMPLE_FMT_S16: +@@ -980,9 +996,25 @@ static AVStream *add_video_stream(mlt_consumer consumer, + c->framerate = av_inv_q(c->time_base); + + // Default to the codec's first pix_fmt if possible. ++#if LIBAVCODEC_VERSION_INT >= ((61 << 16) + (13 << 8) + 100) ++ { ++ const enum AVPixelFormat *video_pix_fmts = NULL; ++ if (codec) ++ avcodec_get_supported_config(NULL, ++ codec, ++ AV_CODEC_CONFIG_PIX_FORMAT, ++ 0, ++ (const void **) &video_pix_fmts, ++ NULL); ++ c->pix_fmt = pix_fmt ? av_get_pix_fmt(pix_fmt) ++ : codec ? (video_pix_fmts ? video_pix_fmts[0] : AV_PIX_FMT_YUV422P) ++ : AV_PIX_FMT_YUV420P; ++ } ++#else + c->pix_fmt = pix_fmt ? av_get_pix_fmt(pix_fmt) + : codec ? (codec->pix_fmts ? codec->pix_fmts[0] : AV_PIX_FMT_YUV422P) + : AV_PIX_FMT_YUV420P; ++#endif + + if (AV_PIX_FMT_VAAPI == c->pix_fmt) { + int result = init_vaapi(properties, c); +@@ -1082,7 +1114,9 @@ static AVStream *add_video_stream(mlt_consumer consumer, + c->rc_override_count = i; + if (!c->rc_initial_buffer_occupancy) + c->rc_initial_buffer_occupancy = c->rc_buffer_size * 3 / 4; ++#if LIBAVCODEC_VERSION_INT < ((62 << 16) + (25 << 8) + 100) + c->intra_dc_precision = mlt_properties_get_int(properties, "dc") - 8; ++#endif + + // Setup dual-pass + i = mlt_properties_get_int(properties, "pass"); +@@ -1199,6 +1233,26 @@ static int open_video(mlt_properties properties, + AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM); + } + ++#if LIBAVCODEC_VERSION_INT >= ((61 << 16) + (13 << 8) + 100) ++ if (codec) { ++ const enum AVPixelFormat *pix_fmts = NULL; ++ avcodec_get_supported_config(NULL, ++ codec, ++ AV_CODEC_CONFIG_PIX_FORMAT, ++ 0, ++ (const void **) &pix_fmts, ++ NULL); ++ if (pix_fmts) { ++ const enum AVPixelFormat *p = pix_fmts; ++ for (; *p != -1; p++) { ++ if (*p == video_enc->pix_fmt) ++ break; ++ } ++ if (*p == -1) ++ video_enc->pix_fmt = pix_fmts[0]; ++ } ++ } ++#else + if (codec && codec->pix_fmts) { + const enum AVPixelFormat *p = codec->pix_fmts; + for (; *p != -1; p++) { +@@ -1208,6 +1262,7 @@ static int open_video(mlt_properties properties, + if (*p == -1) + video_enc->pix_fmt = codec->pix_fmts[0]; + } ++#endif + + const AVPixFmtDescriptor *srcDesc = av_pix_fmt_desc_get(video_enc->pix_fmt); + if (srcDesc->flags & AV_PIX_FMT_FLAG_RGB) { +diff --git a/src/modules/avformat/consumer_avformat.yml b/src/modules/avformat/consumer_avformat.yml +index 989466b55..f3644206c 100644 +--- a/src/modules/avformat/consumer_avformat.yml ++++ b/src/modules/avformat/consumer_avformat.yml +@@ -3,7 +3,7 @@ type: consumer + identifier: avformat + title: FFmpeg Output + version: 7 +-copyright: Copyright (C) 2003-2019 Meltytech, LLC ++copyright: Copyright (C) 2003-2026 Meltytech, LLC + license: LGPL + language: en + url: http://www.ffmpeg.org/ +@@ -452,6 +452,10 @@ parameters: + - identifier: dc + title: Intra DC precision + type: integer ++ description: > ++ Sets intra_dc_precision for MPEG-2 encoding. The value is offset by 8, ++ so the default of 8 means precision 0 (8-bit). Only relevant for ++ MPEG-2; ignored on FFmpeg 8.0 and later. + default: 8 + + - identifier: muxdelay diff --git a/srcpkgs/mlt7/template b/srcpkgs/mlt7/template index 2e01148b7e0d4c..581ad9e96a4064 100644 --- a/srcpkgs/mlt7/template +++ b/srcpkgs/mlt7/template @@ -1,12 +1,12 @@ # Template file for 'mlt7' pkgname=mlt7 version=7.40.0 -revision=1 +revision=2 build_style=cmake configure_args="-DSWIG_PYTHON=ON -DMOD_QT6=ON" hostmakedepends="doxygen pkg-config ladspa-sdk swig python3 which qt5-host-tools qt5-qmake qt6-base qt6-tools" -makedepends="alsa-lib-devel ffmpeg6-devel gtk+-devel jack-devel ladspa-sdk +makedepends="alsa-lib-devel ffmpeg-devel gtk+-devel jack-devel ladspa-sdk libexif-devel libsamplerate-devel libxml2-devel sox-devel SDL2_image-devel fftw-devel frei0r-plugins python3-devel pulseaudio-devel movit-devel libvidstab-devel qt5-svg-devel qt6-svg-devel qt6-qt5compat-devel From 7d66e24e9e788cdf515e3f88628d3db371d02b82 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:43 -0500 Subject: [PATCH 006/115] Aegisub: revbump for ffmpeg9 --- srcpkgs/Aegisub/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/Aegisub/template b/srcpkgs/Aegisub/template index 40660eb34073cd..d12d39cb64e8b4 100644 --- a/srcpkgs/Aegisub/template +++ b/srcpkgs/Aegisub/template @@ -1,14 +1,14 @@ # Template file for 'Aegisub' pkgname=Aegisub version=3.4.2 -revision=6 +revision=7 build_style=meson configure_args="-Dsystem_luajit=true" hostmakedepends="pkg-config gettext meson ninja LuaJIT" makedepends="libass-devel zlib-devel icu-devel boost-devel-minimal libboost_locale libboost_thread - wxWidgets-gtk3-devel MesaLib-devel LuaJIT-devel fontconfig-devel ffmpeg6 - ffmpeg6-devel libffms2-devel fftw-devel hunspell-devel uchardet-devel gtest-devel + wxWidgets-gtk3-devel MesaLib-devel LuaJIT-devel fontconfig-devel ffmpeg + ffmpeg-devel libffms2-devel fftw-devel hunspell-devel uchardet-devel gtest-devel pulseaudio-devel alsa-lib-devel libopenal-devel portaudio-devel libcurl-devel" short_desc="Cross-platform advanced subtitle editor" maintainer="Komeil Parseh " From fd1fdb3af9a18e1a8ce577ffee65b3cc6a54e3e3 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:43 -0500 Subject: [PATCH 007/115] QMPlay2: revbump for ffmpeg9 --- srcpkgs/QMPlay2/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/QMPlay2/template b/srcpkgs/QMPlay2/template index 4ef389cbda2638..efbbfc4af830ee 100644 --- a/srcpkgs/QMPlay2/template +++ b/srcpkgs/QMPlay2/template @@ -1,10 +1,10 @@ # Template file for 'QMPlay2' pkgname=QMPlay2 version=26.08.02 -revision=1 +revision=2 build_style=cmake hostmakedepends="pkg-config qt6-base qt6-tools shaderc" -makedepends="alsa-lib-devel ffmpeg6-devel libass-devel libcdio-devel +makedepends="alsa-lib-devel ffmpeg-devel libass-devel libcdio-devel libgme-devel libsidplayfp-devel libva-glx-devel libXv-devel pulseaudio-devel qt6-svg-devel qt6-tools-devel taglib-devel libcdio-paranoia-devel qt6-declarative-devel qt6-qt5compat-devel" From fa5376235e779222ab142f13103f5e09615ebadb Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:43 -0500 Subject: [PATCH 008/115] alsa-plugins: revbump for ffmpeg9 --- srcpkgs/alsa-plugins/patches/ffmpeg9.patch | 15 +++++++++++++++ srcpkgs/alsa-plugins/template | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/alsa-plugins/patches/ffmpeg9.patch diff --git a/srcpkgs/alsa-plugins/patches/ffmpeg9.patch b/srcpkgs/alsa-plugins/patches/ffmpeg9.patch new file mode 100644 index 00000000000000..e88de7ed90ca6d --- /dev/null +++ b/srcpkgs/alsa-plugins/patches/ffmpeg9.patch @@ -0,0 +1,15 @@ +# https://gitlab.archlinux.org/archlinux/packaging/packages/alsa-plugins/-/blob/main/ffmpeg9.patch?ref_type=heads +diff -ru alsa-plugins-1.2.12.orig/a52/pcm_a52.c alsa-plugins-1.2.12/a52/pcm_a52.c +--- alsa-plugins-1.2.12.orig/a52/pcm_a52.c 2026-08-05 11:55:24.343137446 +0200 ++++ alsa-plugins-1.2.12/a52/pcm_a52.c 2026-08-05 11:57:53.916162117 +0200 +@@ -1202,7 +1202,9 @@ + rec->io.flags = SND_PCM_IOPLUG_FLAG_BOUNDARY_WA; + #endif + #ifdef USE_AVCODEC_FRAME +- rec->av_format = rec->codec->sample_fmts[0]; ++ const enum AVSampleFormat *codec_sample_fmts = NULL; ++ avcodec_get_supported_config(NULL, rec->codec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0, (const void**)&codec_sample_fmts, NULL); ++ rec->av_format = codec_sample_fmts[0]; + rec->is_planar = av_sample_fmt_is_planar(rec->av_format); + #else + rec->av_format = AV_SAMPLE_FMT_S16; diff --git a/srcpkgs/alsa-plugins/template b/srcpkgs/alsa-plugins/template index 97b780f1a15d6f..f8a58f47fb8db1 100644 --- a/srcpkgs/alsa-plugins/template +++ b/srcpkgs/alsa-plugins/template @@ -1,11 +1,11 @@ # Template file for 'alsa-plugins' pkgname=alsa-plugins version=1.2.12 -revision=2 +revision=3 build_style=gnu-configure configure_args="--disable-maemo-plugin" hostmakedepends="pkg-config" -makedepends="ffmpeg6-devel jack-devel libsamplerate-devel pulseaudio-devel" +makedepends="ffmpeg-devel jack-devel libsamplerate-devel pulseaudio-devel" short_desc="Advanced Linux Sound Architecture (ALSA) extra plugins" maintainer="Orphaned " license="GPL-2.0-or-later, LGPL-2.1-or-later" From 37f54524076e50f93d9259f030dabdd2c6420823 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 009/115] attract: revbump for ffmpeg9 --- srcpkgs/attract/patches/ffmpeg8.patch | 84 +++++++++++++++++++++++++++ srcpkgs/attract/template | 4 +- 2 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/attract/patches/ffmpeg8.patch diff --git a/srcpkgs/attract/patches/ffmpeg8.patch b/srcpkgs/attract/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..2b32346d0fd5c3 --- /dev/null +++ b/srcpkgs/attract/patches/ffmpeg8.patch @@ -0,0 +1,84 @@ +--- a/src/media.cpp ++++ b/src/media.cpp +@@ -61,6 +61,9 @@ + #define FORMAT_CTX_URL m_imp->m_format_ctx->filename + #endif + ++#define HAVE_CH_LAYOUT (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(57, 28, 100)) ++#define HAVE_DURATION (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(58, 2, 100)) ++ + void try_hw_accel( AVCodecContext *&codec_ctx, FeAVCodec *&dec ); + + std::string g_decoder; +@@ -323,7 +326,7 @@ + { + int data_size = av_samples_get_buffer_size( + NULL, +- codec_ctx->channels, ++ codec_ctx->ch_layout.nb_channels, + frame->nb_samples, + codec_ctx->sample_fmt, 1); + +@@ -349,17 +352,16 @@ + return false; + } + +- int64_t channel_layout = frame->channel_layout; +- if ( !channel_layout ) +- { +- channel_layout = av_get_default_channel_layout( +- codec_ctx->channels ); +- } ++ AVChannelLayout layout; ++ av_channel_layout_copy(&layout, &frame->ch_layout); ++ if (!av_channel_layout_check(&layout) ) { ++ av_channel_layout_default(&layout, codec_ctx->ch_layout.nb_channels); ++ } ++ av_opt_set_chlayout(resample_ctx, "in_chlayout", &layout, 0); ++ av_opt_set_chlayout(resample_ctx, "out_chlayout", &layout, 0); + +- av_opt_set_int( resample_ctx, "in_channel_layout", channel_layout, 0 ); + av_opt_set_int( resample_ctx, "in_sample_fmt", frame->format, 0 ); + av_opt_set_int( resample_ctx, "in_sample_rate", frame->sample_rate, 0 ); +- av_opt_set_int( resample_ctx, "out_channel_layout", channel_layout, 0 ); + av_opt_set_int( resample_ctx, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0 ); + av_opt_set_int( resample_ctx, "out_sample_rate", frame->sample_rate, 0 ); + +@@ -384,7 +386,7 @@ + int out_linesize; + av_samples_get_buffer_size( + &out_linesize, +- codec_ctx->channels, ++ codec_ctx->ch_layout.nb_channels, + frame->nb_samples, + AV_SAMPLE_FMT_S16, 0 ); + +@@ -402,8 +404,8 @@ + FeLog() << "Error performing audio conversion." << std::endl; + return false; + } +- offset += out_samples * codec_ctx->channels; +- data.sampleCount += out_samples * codec_ctx->channels; ++ offset += out_samples * codec_ctx->ch_layout.nb_channels; ++ data.sampleCount += out_samples * codec_ctx->ch_layout.nb_channels; + data.samples = audio_buff; + } + } +@@ -760,7 +762,7 @@ + + // Track pts and duration if we need to correct next frame + prev_pts = raw_frame->pts; +- prev_duration = raw_frame->pkt_duration; ++ prev_duration = raw_frame->duration; + #endif + + detached_frame = raw_frame; +@@ -1066,7 +1068,7 @@ + + codec_ctx->sample_rate ); + + sf::SoundStream::initialize( +- codec_ctx->channels, ++ codec_ctx->ch_layout.nb_channels, + codec_ctx->sample_rate ); + + sf::SoundStream::setLoop( false ); diff --git a/srcpkgs/attract/template b/srcpkgs/attract/template index f6cda941c297cf..92a85c2cd663d4 100644 --- a/srcpkgs/attract/template +++ b/srcpkgs/attract/template @@ -1,12 +1,12 @@ # Template file for 'attract' pkgname=attract version=2.7.0 -revision=3 +revision=4 build_style=gnu-makefile make_build_args="VERBOSE=1" make_use_env=yes hostmakedepends="pkg-config" -makedepends="SFML-devel ffmpeg6-devel fontconfig-devel glu-devel libarchive-devel +makedepends="SFML-devel ffmpeg-devel fontconfig-devel glu-devel libarchive-devel libcurl-devel libjpeg-turbo-devel libXinerama-devel libXrandr-devel" short_desc="Attract-Mode is a graphical frontend for emulators" maintainer="Pedro Narciso García Revington " From c7f94b2c3f899ee3f508efa81f240f1417df3658 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 010/115] audacious-plugins: revbump for ffmpeg9 --- srcpkgs/audacious-plugins/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/audacious-plugins/template b/srcpkgs/audacious-plugins/template index 04799588e35056..bc6ff635a614fb 100644 --- a/srcpkgs/audacious-plugins/template +++ b/srcpkgs/audacious-plugins/template @@ -2,12 +2,12 @@ # Keep in sync with audacious and audacious-base pkgname=audacious-plugins version=4.6.1 -revision=1 +revision=2 build_style=meson configure_args="$(vopt_bool gtk) $(vopt_bool qt)" hostmakedepends="gettext pkg-config glib-devel $(vopt_if qt qt6-tools)" makedepends="audacious-base-devel alsa-lib-devel pulseaudio-devel jack-devel - lame-devel libvorbis-devel libflac-devel mpg123-devel faad2-devel ffmpeg6-devel + lame-devel libvorbis-devel libflac-devel mpg123-devel faad2-devel ffmpeg-devel libmodplug-devel fluidsynth-devel libcdio-paranoia-devel wavpack-devel libnotify-devel libcurl-devel libmtp-devel neon-devel libmms-devel libxml2-devel opus-devel opusfile-devel libbs2b-devel libsoxr-devel libsidplayfp-devel libcue-devel libopenmpt-devel pipewire-devel From 6f9d1ca35430588659c4f965d330cefa1b7aeeb2 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 011/115] audacity: revbump for ffmpeg9 --- srcpkgs/audacity/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/audacity/template b/srcpkgs/audacity/template index 013fe8dc86044f..37fe3d9ef2c3fd 100644 --- a/srcpkgs/audacity/template +++ b/srcpkgs/audacity/template @@ -1,7 +1,7 @@ # Template file for 'audacity' pkgname=audacity version=3.7.8 -revision=2 +revision=3 build_style=cmake build_helper="cmake-wxWidgets-gtk3 qemu" configure_args="-Daudacity_use_ffmpeg=loaded -Daudacity_lib_preference=system @@ -12,7 +12,7 @@ configure_args="-Daudacity_use_ffmpeg=loaded -Daudacity_lib_preference=system -Daudacity_has_updates_check=OFF -DAUDACITY_BUILD_LEVEL=2" hostmakedepends="pkg-config gettext python3" makedepends="wxWidgets-gtk3-devel gtk+3-devel expat-devel lame-devel - libsoxr-devel portaudio-devel sqlite-devel ffmpeg6-devel + libsoxr-devel portaudio-devel sqlite-devel ffmpeg-devel libid3tag-devel libmad-devel vamp-plugin-sdk-devel libogg-devel libvorbis-devel libflac-devel lilv-devel lv2 serd-devel sord-devel sratom-devel suil-devel portmidi-devel soundtouch-devel twolame-devel From 3d8951f786c942e00a5536d8f19745d8ecec3f6d Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 012/115] avidemux: revbump for ffmpeg9 --- srcpkgs/avidemux/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/avidemux/template b/srcpkgs/avidemux/template index 0c234c3124caa0..e876f571c8507f 100644 --- a/srcpkgs/avidemux/template +++ b/srcpkgs/avidemux/template @@ -1,14 +1,14 @@ # Template file for 'avidemux' pkgname=avidemux version=2.8.1 -revision=6 +revision=7 # Can't be compiled for aarch64, arm* or mips* archs="x86_64* i686*" hostmakedepends="cmake-bootstrap pkg-config qt5-host-tools qt5-devel tar yasm" makedepends="alsa-lib-devel faac-devel faad2-devel gettext-devel jack-devel glu-devel lame-devel libass-devel libdca-devel libvorbis-devel libXv-devel vapoursynth-devel libmp4v2-devel sqlite-devel libva-devel libvdpau-devel - qt5-multimedia-devel qt5-script-devel qt5-tools-devel ffmpeg6-devel + qt5-multimedia-devel qt5-script-devel qt5-tools-devel ffmpeg-devel liba52-devel libmad-devel x264-devel x265-devel xvidcore-devel" short_desc="Video editing and processing application" maintainer="Orphaned " From 9addaaf82f22a1b93efa386a6d88fecb643d1c2b Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 013/115] baresip: revbump for ffmpeg9 --- srcpkgs/baresip/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/baresip/template b/srcpkgs/baresip/template index 206a8c2759c758..caa43b3f23bcc6 100644 --- a/srcpkgs/baresip/template +++ b/srcpkgs/baresip/template @@ -1,12 +1,12 @@ # Template file for 'baresip' pkgname=baresip version=4.11.0 -revision=1 +revision=2 build_style=cmake hostmakedepends="pkg-config glib-devel" makedepends="libpng-devel openssl-devel libsndfile-devel opus-devel re-devel spandsp-devel gst-plugins-base1-devel jack-devel - gstreamer1-devel gtk+3-devel SDL2-devel ffmpeg6-devel libvpx-devel + gstreamer1-devel gtk+3-devel SDL2-devel ffmpeg-devel libvpx-devel libX11-devel v4l-utils-devel libXext-devel webrtc-audio-processing-devel fdk-aac-devel libmosquitto-devel codec2-devel" # sndio-devel Currently not hooked up in their cmake build system From dfa63dbc80793523a1f3608a9af8657204dcea12 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 014/115] calibre: revbump for ffmpeg9 --- srcpkgs/calibre/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/calibre/template b/srcpkgs/calibre/template index b2f6256aa2971a..46c7ef4288fbc0 100644 --- a/srcpkgs/calibre/template +++ b/srcpkgs/calibre/template @@ -1,7 +1,7 @@ # Template file for 'calibre' pkgname=calibre version=9.14.0 -revision=2 +revision=3 build_helper=python3 pycompile_dirs="/usr/lib/calibre/" hostmakedepends="pkg-config cmake python3-BeautifulSoup4 python3-Pillow @@ -17,7 +17,7 @@ makedepends="libinput-devel libmagick-devel libmtp-devel libstemmer-devel python3-pyqt6-gui python3-pyqt6-svg python3-pyqt6-widgets python3-pyqt6-network python3-pyqt6-printsupport python3-pyqt6-webengine python3-pyqt6-webchannel qt6-base-private-devel python3-pyqt6-bindings python3-pyqt6-webengine-devel - ffmpeg6-devel python3-tzlocal" + ffmpeg-devel python3-tzlocal" depends="desktop-file-utils optipng poppler python3-BeautifulSoup4 qt6-imageformats python3-Pygments python3-pycryptodome python3-xxhash python3-Markdown python3-Pillow python3-zeroconf python3-Pygments python3-apsw From a44739b6ca6bd1e806fae3d9bb70c35a09230b7a Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 4 Jan 2026 15:41:25 -0500 Subject: [PATCH 015/115] gpac: revbump for ffmpeg9 --- srcpkgs/gpac/patches/ffmpeg9.patch | 156 +++++++++++++++++++++++++++++ srcpkgs/gpac/template | 4 +- 2 files changed, 158 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/gpac/patches/ffmpeg9.patch diff --git a/srcpkgs/gpac/patches/ffmpeg9.patch b/srcpkgs/gpac/patches/ffmpeg9.patch new file mode 100644 index 00000000000000..9b27c0bba7df23 --- /dev/null +++ b/srcpkgs/gpac/patches/ffmpeg9.patch @@ -0,0 +1,156 @@ +# https://gitlab.archlinux.org/archlinux/packaging/packages/gpac/-/blob/main/ffmpeg-9.patch?ref_type=heads +diff --git a/src/filters/ff_enc.c b/src/filters/ff_enc.c +index 78345df5a..59792fb45 100644 +--- a/src/filters/ff_enc.c ++++ b/src/filters/ff_enc.c +@@ -1671,14 +1671,16 @@ static GF_Err ffenc_configure_pid_ex(GF_Filter *filter, GF_FilterPid *pid, Bool + if (ctx->pfmt) { + u32 ff_pfmt = ffmpeg_pixfmt_from_gpac(ctx->pfmt, GF_FALSE); + i=0; +- while (codec->pix_fmts) { +- if (codec->pix_fmts[i] == AV_PIX_FMT_NONE) break; +- if (codec->pix_fmts[i] == ff_pfmt) { ++ const enum AVPixelFormat* codec_pix_fmts = NULL; ++ avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_PIX_FORMAT, 0, (const void**)&codec_pix_fmts, NULL); ++ while (codec_pix_fmts) { ++ if (codec_pix_fmts[i] == AV_PIX_FMT_NONE) break; ++ if (codec_pix_fmts[i] == ff_pfmt) { + force_pfmt = ff_pfmt; + break; + } + //handle pixel formats aliases +- if (ffmpeg_pixfmt_to_gpac(codec->pix_fmts[i], GF_TRUE) == ctx->pfmt) { ++ if (ffmpeg_pixfmt_to_gpac(codec_pix_fmts[i], GF_TRUE) == ctx->pfmt) { + force_pfmt = ctx->pixel_fmt; + break; + } +@@ -1695,15 +1697,17 @@ static GF_Err ffenc_configure_pid_ex(GF_Filter *filter, GF_FilterPid *pid, Bool + if (force_pfmt == AV_PIX_FMT_NONE) { + change_input_fmt = AV_PIX_FMT_NONE; + i=0; +- while (codec->pix_fmts) { +- if (codec->pix_fmts[i] == AV_PIX_FMT_NONE) break; +- if (codec->pix_fmts[i] == ctx->pixel_fmt) { ++ const enum AVPixelFormat* codec_pix_fmts = NULL; ++ avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_PIX_FORMAT, 0, (const void**)&codec_pix_fmts, NULL); ++ while (codec_pix_fmts) { ++ if (codec_pix_fmts[i] == AV_PIX_FMT_NONE) break; ++ if (codec_pix_fmts[i] == ctx->pixel_fmt) { + change_input_fmt = ctx->pixel_fmt; + break; + } + //handle pixel formats aliases +- if (ffmpeg_pixfmt_to_gpac(codec->pix_fmts[i], GF_TRUE) == pfmt) { +- ctx->pixel_fmt = change_input_fmt = codec->pix_fmts[i]; ++ if (ffmpeg_pixfmt_to_gpac(codec_pix_fmts[i], GF_TRUE) == pfmt) { ++ ctx->pixel_fmt = change_input_fmt = codec_pix_fmts[i]; + break; + } + i++; +@@ -1724,9 +1728,11 @@ static GF_Err ffenc_configure_pid_ex(GF_Filter *filter, GF_FilterPid *pid, Bool + if (codec_alt==codec) continue; + if (codec_alt->id == codec_id) { + i=0; +- while (codec_alt->pix_fmts) { +- if (codec_alt->pix_fmts[i] == AV_PIX_FMT_NONE) break; +- if (codec_alt->pix_fmts[i] == ctx->pixel_fmt) { ++ const enum AVPixelFormat* codec_alt_pix_fmts = NULL; ++ avcodec_get_supported_config(NULL, codec_alt, AV_CODEC_CONFIG_PIX_FORMAT, 0, (const void**)&codec_alt_pix_fmts, NULL); ++ while (codec_alt_pix_fmts) { ++ if (codec_alt_pix_fmts[i] == AV_PIX_FMT_NONE) break; ++ if (codec_alt_pix_fmts[i] == ctx->pixel_fmt) { + change_input_fmt = ctx->pixel_fmt; + GF_LOG(GF_LOG_WARNING, GF_LOG_CODEC, ("[FFEnc] Reassigning codec from %s to %s to match pixel format\n", codec->name, codec_alt->name )); + codec = codec_alt; +@@ -1746,10 +1752,12 @@ static GF_Err ffenc_configure_pid_ex(GF_Filter *filter, GF_FilterPid *pid, Bool + ff_pmft = AV_PIX_FMT_NONE; + i=0; + //find a mapped pixel format +- while (codec->pix_fmts) { +- if (codec->pix_fmts[i] == AV_PIX_FMT_NONE) break; +- if (ffmpeg_pixfmt_to_gpac(codec->pix_fmts[i], GF_TRUE)) { +- ff_pmft = codec->pix_fmts[i]; ++ const enum AVPixelFormat* codec_pix_fmts = NULL; ++ avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_PIX_FORMAT, 0, (const void**)&codec_pix_fmts, NULL); ++ while (codec_pix_fmts) { ++ if (codec_pix_fmts[i] == AV_PIX_FMT_NONE) break; ++ if (ffmpeg_pixfmt_to_gpac(codec_pix_fmts[i], GF_TRUE)) { ++ ff_pmft = codec_pix_fmts[i]; + break; + } + i++; +@@ -1793,21 +1801,25 @@ static GF_Err ffenc_configure_pid_ex(GF_Filter *filter, GF_FilterPid *pid, Bool + //check audio format + ctx->sample_fmt = ffmpeg_audio_fmt_from_gpac(afmt); + change_input_fmt = AV_SAMPLE_FMT_NONE; +- while (codec->sample_fmts) { +- if (codec->sample_fmts[i] == AV_SAMPLE_FMT_NONE) break; +- if (codec->sample_fmts[i] == ctx->sample_fmt) { ++ const enum AVSampleFormat *codec_sample_fmts = NULL; ++ avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0, (const void**)&codec_sample_fmts, NULL); ++ while (codec_sample_fmts) { ++ if (codec_sample_fmts[i] == AV_SAMPLE_FMT_NONE) break; ++ if (codec_sample_fmts[i] == ctx->sample_fmt) { + change_input_fmt = ctx->sample_fmt; + break; + } + i++; + } + i=0; +- if (!codec->supported_samplerates) ++ const int *codec_supported_samplerates = NULL; ++ avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_SAMPLE_RATE, 0, (const void**)&codec_supported_samplerates, NULL); ++ if (!codec_supported_samplerates) + change_input_sr = ctx->sample_rate; + +- while (codec->supported_samplerates) { +- if (!codec->supported_samplerates[i]) break; +- if (codec->supported_samplerates[i]==ctx->sample_rate) { ++ while (codec_supported_samplerates) { ++ if (!codec_supported_samplerates[i]) break; ++ if (codec_supported_samplerates[i]==ctx->sample_rate) { + change_input_sr = ctx->sample_rate; + break; + } +@@ -1832,12 +1844,14 @@ static GF_Err ffenc_configure_pid_ex(GF_Filter *filter, GF_FilterPid *pid, Bool + i++; + } + #else +- if (!codec->ch_layouts) ++ const AVChannelLayout *codec_ch_layouts = NULL; ++ avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_CHANNEL_LAYOUT, 0, (const void**)&codec_ch_layouts, NULL); ++ if (!codec_ch_layouts) + change_chan_layout = ctx->channel_layout; + +- while (codec->ch_layouts) { +- if (!codec->ch_layouts[i].nb_channels) break; +- if (codec->ch_layouts[i].u.mask == ff_ch_layout) { ++ while (codec_ch_layouts) { ++ if (!codec_ch_layouts[i].nb_channels) break; ++ if (codec_ch_layouts[i].u.mask == ff_ch_layout) { + change_chan_layout = ctx->channel_layout; + break; + } +@@ -1855,19 +1869,19 @@ static GF_Err ffenc_configure_pid_ex(GF_Filter *filter, GF_FilterPid *pid, Bool + || (ctx->channel_layout != change_chan_layout) + ) { + if (ctx->sample_fmt != change_input_fmt) { +- ctx->sample_fmt = codec->sample_fmts ? codec->sample_fmts[0] : AV_SAMPLE_FMT_S16; ++ ctx->sample_fmt = codec_sample_fmts ? codec_sample_fmts[0] : AV_SAMPLE_FMT_S16; + afmt = ffmpeg_audio_fmt_to_gpac(ctx->sample_fmt); + gf_filter_pid_negotiate_property(ctx->in_pid, GF_PROP_PID_AUDIO_FORMAT, &PROP_UINT(afmt) ); + } + if (ctx->sample_rate != change_input_sr) { +- gf_filter_pid_negotiate_property(ctx->in_pid, GF_PROP_PID_SAMPLE_RATE, &PROP_UINT(codec->supported_samplerates[0]) ); ++ gf_filter_pid_negotiate_property(ctx->in_pid, GF_PROP_PID_SAMPLE_RATE, &PROP_UINT(codec_supported_samplerates[0]) ); + } + if (ctx->channel_layout != change_chan_layout) { + if (!change_chan_layout) { + #ifdef FFMPEG_OLD_CHLAYOUT + change_chan_layout = ffmpeg_channel_layout_to_gpac(codec->channel_layouts[0]); + #else +- change_chan_layout = ffmpeg_channel_layout_to_gpac(codec->ch_layouts[0].u.mask); ++ change_chan_layout = ffmpeg_channel_layout_to_gpac(codec_ch_layouts[0].u.mask); + #endif + } + u32 nb_chans = gf_audio_fmt_get_num_channels_from_layout(change_chan_layout); diff --git a/srcpkgs/gpac/template b/srcpkgs/gpac/template index 0ffa0066dfaed5..dd81e46a62623f 100644 --- a/srcpkgs/gpac/template +++ b/srcpkgs/gpac/template @@ -1,11 +1,11 @@ # Template file for 'gpac' pkgname=gpac version=26.02.0 -revision=1 +revision=2 build_style=configure configure_args="--prefix=/usr --enable-pic" hostmakedepends="pkg-config" -makedepends="alsa-lib-devel faad2-devel ffmpeg6-devel freetype-devel jack-devel +makedepends="alsa-lib-devel faad2-devel ffmpeg-devel freetype-devel jack-devel libcaca-devel libjpeg-turbo-devel liblzma-devel libmad-devel libopenjpeg2-devel libpng-devel libtheora-devel libvorbis-devel libXv-devel nghttp2-devel openssl-devel pulseaudio-devel SDL2-devel zlib-devel" From 5af3467c9814d715db487e2f614369b43a16f195 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 016/115] ccextractor: revbump for ffmpeg9 --- srcpkgs/ccextractor/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/ccextractor/template b/srcpkgs/ccextractor/template index bea85b0a0b0c39..d8d7378ccd02a3 100644 --- a/srcpkgs/ccextractor/template +++ b/srcpkgs/ccextractor/template @@ -1,13 +1,13 @@ # Template file for 'ccextractor' pkgname=ccextractor version=0.96.6 -revision=2 +revision=3 build_wrksrc="linux" build_style=gnu-configure build_helper=rust configure_args="--enable-ocr --enable-hardsubx" hostmakedepends="automake cargo clang pkg-config tesseract-ocr-devel" -makedepends="ffmpeg6-devel freetype-devel leptonica-devel libgpac-devel +makedepends="ffmpeg-devel freetype-devel leptonica-devel libgpac-devel libpng-devel libutf8proc-devel rust-std tesseract-ocr-devel zlib-devel" short_desc="Extract subtitles from video streams" maintainer="newbluemoon " From 00e2ab86ae610c40745da7b20968248aab23e6f7 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 017/115] cmus: revbump for ffmpeg9 --- srcpkgs/cmus/patches/ffmpeg8.patch | 826 +++++++++++++++++++++++++++++ srcpkgs/cmus/template | 4 +- 2 files changed, 828 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/cmus/patches/ffmpeg8.patch diff --git a/srcpkgs/cmus/patches/ffmpeg8.patch b/srcpkgs/cmus/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..5fb8c906698a6c --- /dev/null +++ b/srcpkgs/cmus/patches/ffmpeg8.patch @@ -0,0 +1,826 @@ +--- a/ip/ffmpeg.c ++++ b/ip/ffmpeg.c +@@ -25,7 +25,6 @@ + #include "../config/ffmpeg.h" + #endif + +-#include + #include + #include + #include +@@ -36,86 +35,33 @@ + #include + #endif + +-#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE +-#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 +-#endif +- +-struct ffmpeg_input { +- AVPacket pkt; +- int curr_pkt_size; +- uint8_t *curr_pkt_buf; +- int stream_index; +- +- unsigned long curr_size; +- unsigned long curr_duration; +-}; +- +-struct ffmpeg_output { +- uint8_t *buffer; +- uint8_t *buffer_malloc; +- uint8_t *buffer_pos; /* current buffer position */ +- int buffer_used_len; +-}; +- + struct ffmpeg_private { +- AVCodecContext *codec_context; +- AVFormatContext *input_context; ++ AVCodecContext *codec_ctx; ++ AVFormatContext *format_ctx; + AVCodec const *codec; + SwrContext *swr; ++ int stream_index; + +- struct ffmpeg_input *input; +- struct ffmpeg_output *output; +-}; +- +-static struct ffmpeg_input *ffmpeg_input_create(void) +-{ +- struct ffmpeg_input *input = xnew(struct ffmpeg_input, 1); +- +- if (av_new_packet(&input->pkt, 0) != 0) { +- free(input); +- return NULL; +- } +- input->curr_pkt_size = 0; +- input->curr_pkt_buf = input->pkt.data; +- return input; +-} +- +-static void ffmpeg_input_free(struct ffmpeg_input *input) +-{ +-#if LIBAVCODEC_VERSION_MAJOR >= 56 +- av_packet_unref(&input->pkt); +-#else +- av_free_packet(&input->pkt); +-#endif +- free(input); +-} +- +-static struct ffmpeg_output *ffmpeg_output_create(void) +-{ +- struct ffmpeg_output *output = xnew(struct ffmpeg_output, 1); +- +- output->buffer_malloc = xnew(uint8_t, AVCODEC_MAX_AUDIO_FRAME_SIZE + 15); +- output->buffer = output->buffer_malloc; +- /* align to 16 bytes so avcodec can SSE/Altivec/etc */ +- while ((intptr_t) output->buffer % 16) +- output->buffer += 1; +- output->buffer_pos = output->buffer; +- output->buffer_used_len = 0; +- return output; +-} ++ AVPacket *pkt; ++ AVFrame *frame; ++ double seek_ts; ++ int64_t skip_samples; ++ ++ /* A buffer to hold swr_convert()-ed samples */ ++ AVFrame *swr_frame; ++ int swr_frame_samples_cap; ++ int swr_frame_start; + +-static void ffmpeg_output_free(struct ffmpeg_output *output) +-{ +- free(output->buffer_malloc); +- output->buffer_malloc = NULL; +- output->buffer = NULL; +- free(output); +-} ++ /* Bitrate estimation */ ++ unsigned long curr_size; ++ unsigned long curr_duration; ++}; + +-static inline void ffmpeg_buffer_flush(struct ffmpeg_output *output) ++static const char *ffmpeg_errmsg(int err) + { +- output->buffer_pos = output->buffer; +- output->buffer_used_len = 0; ++ static char errstr[AV_ERROR_MAX_STRING_SIZE]; ++ av_strerror(err, errstr, AV_ERROR_MAX_STRING_SIZE); ++ return errstr; + } + + static void ffmpeg_init(void) +@@ -128,329 +74,381 @@ + + av_log_set_level(AV_LOG_QUIET); + +-#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 18, 100) ++#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 9, 100) + /* We could register decoders explicitly to save memory, but we have to + * be careful about compatibility. */ + av_register_all(); + #endif + } + +-static int ffmpeg_open(struct input_plugin_data *ip_data) ++static int ffmpeg_open_input(struct input_plugin_data *ip_data, ++ struct ffmpeg_private *priv) + { +- struct ffmpeg_private *priv; +- int err = 0; +- int i; +- int stream_index = -1; +- int out_sample_rate; +- AVCodec const *codec; +- AVCodecContext *cc = NULL; + AVFormatContext *ic = NULL; +-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 101) ++ AVCodecContext *cc = NULL; + AVCodecParameters *cp = NULL; +-#endif +- SwrContext *swr = NULL; ++ AVCodec const *codec = NULL; ++ int stream_index = -1; + +- ffmpeg_init(); ++ int err; ++ int res = avformat_open_input(&ic, ip_data->filename, NULL, NULL); ++ if (res < 0) { ++ err = -IP_ERROR_FILE_FORMAT; ++ goto err; ++ } ++ ++ res = avformat_find_stream_info(ic, NULL); ++ if (res < 0) { ++ d_print("unable to find stream info\n"); ++ err = -IP_ERROR_FILE_FORMAT; ++ goto err; ++ } ++ ++ for (int i = 0; i < ic->nb_streams; i++) { ++ cp = ic->streams[i]->codecpar; ++ if (cp->codec_type == AVMEDIA_TYPE_AUDIO) { ++ stream_index = i; ++ break; ++ } ++ } + +- err = avformat_open_input(&ic, ip_data->filename, NULL, NULL); +- if (err < 0) { +- d_print("av_open failed: %d\n", err); +- return -IP_ERROR_FILE_FORMAT; ++ if (stream_index == -1) { ++ d_print("could not find audio stream\n"); ++ err = -IP_ERROR_FILE_FORMAT; ++ goto err_silent; ++ } ++ ++ codec = avcodec_find_decoder(cp->codec_id); ++ if (!codec) { ++ d_print("codec (id: %d, name: %s) not found\n", ++ cc->codec_id, avcodec_get_name(cc->codec_id)); ++ err = -IP_ERROR_UNSUPPORTED_FILE_TYPE; ++ goto err_silent; ++ } ++ cc = avcodec_alloc_context3(codec); ++ avcodec_parameters_to_context(cc, cp); ++ ++ res = avcodec_open2(cc, codec, NULL); ++ if (res < 0) { ++ d_print("could not open codec (id: %d, name: %s)\n", ++ cc->codec_id, avcodec_get_name(cc->codec_id)); ++ err = -IP_ERROR_UNSUPPORTED_FILE_TYPE; ++ goto err; + } + +- do { +- err = avformat_find_stream_info(ic, NULL); +- if (err < 0) { +- d_print("unable to find stream info: %d\n", err); +- err = -IP_ERROR_FILE_FORMAT; ++ priv->format_ctx = ic; ++ priv->codec_ctx = cc; ++ priv->codec = codec; ++ priv->stream_index = stream_index; ++ return 0; ++err: ++ d_print("%s\n", ffmpeg_errmsg(res)); ++err_silent: ++ avcodec_free_context(&cc); ++ avformat_close_input(&ic); ++ return err; ++} ++ ++static void ffmpeg_set_sf_and_swr_opts(SwrContext *swr, AVCodecContext *cc, ++ sample_format_t *sf_out, enum AVSampleFormat *out_sample_fmt) ++{ ++ int out_sample_rate = min_u(cc->sample_rate, 384000); ++ sample_format_t sf = sf_rate(out_sample_rate) | sf_host_endian(); ++ av_opt_set_int(swr, "in_sample_rate", cc->sample_rate, 0); ++ av_opt_set_int(swr, "out_sample_rate", out_sample_rate, 0); ++ ++ switch (cc->sample_fmt) { ++ case AV_SAMPLE_FMT_FLT: case AV_SAMPLE_FMT_FLTP: ++ case AV_SAMPLE_FMT_S32: case AV_SAMPLE_FMT_S32P: ++ sf |= sf_bits(32) | sf_signed(1); ++ *out_sample_fmt = AV_SAMPLE_FMT_S32; + break; +- } ++ default: ++ sf |= sf_bits(16) | sf_signed(1); ++ *out_sample_fmt = AV_SAMPLE_FMT_S16; ++ } ++ av_opt_set_sample_fmt(swr, "in_sample_fmt", cc->sample_fmt, 0); ++ av_opt_set_sample_fmt(swr, "out_sample_fmt", *out_sample_fmt, 0); + +- for (i = 0; i < ic->nb_streams; i++) { ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(59, 24, 100) ++ sf |= sf_channels(cc->ch_layout.nb_channels); + +-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 101) +- cp = ic->streams[i]->codecpar; +- if (cp->codec_type == AVMEDIA_TYPE_AUDIO) { +- stream_index = i; +- break; +- } ++ if (cc->ch_layout.order == AV_CHANNEL_ORDER_UNSPEC) ++ av_channel_layout_default(&cc->ch_layout, cc->ch_layout.nb_channels); ++ av_opt_set_chlayout(swr, "in_chlayout", &cc->ch_layout, 0); ++ av_opt_set_chlayout(swr, "out_chlayout", &cc->ch_layout, 0); + #else +- cc = ic->streams[i]->codec; +- if (cc->codec_type == AVMEDIA_TYPE_AUDIO) { +- stream_index = i; +- break; +- } ++ sf |= sf_channels(cc->channels); ++ ++ av_opt_set_int(swr, "in_channel_layout", ++ av_get_default_channel_layout(cc->channels), 0); ++ av_opt_set_int(swr, "out_channel_layout", ++ av_get_default_channel_layout(cc->channels), 0); + #endif +- } + +- if (stream_index == -1) { +- d_print("could not find audio stream\n"); +- err = -IP_ERROR_FILE_FORMAT; +- break; +- } ++ *sf_out = sf; ++} ++ ++static int ffmpeg_init_swr_frame(struct ffmpeg_private *priv, ++ sample_format_t sf, enum AVSampleFormat out_sample_fmt) ++{ ++ AVCodecContext *cc = priv->codec_ctx; ++ AVFrame *frame = av_frame_alloc(); + +-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 101) +- codec = avcodec_find_decoder(cp->codec_id); +- cc = avcodec_alloc_context3(codec); +- avcodec_parameters_to_context(cc, cp); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(59, 24, 100) ++ av_channel_layout_copy(&frame->ch_layout, &cc->ch_layout); + #else +- codec = avcodec_find_decoder(cc->codec_id); ++ frame->channel_layout = av_get_default_channel_layout(cc->channels); + #endif +- if (!codec) { +- d_print("codec not found: %d, %s\n", cc->codec_id, avcodec_get_name(cc->codec_id)); +- err = -IP_ERROR_UNSUPPORTED_FILE_TYPE; +- break; +- } + +- if (avcodec_open2(cc, codec, NULL) < 0) { +- d_print("could not open codec: %d, %s\n", cc->codec_id, avcodec_get_name(cc->codec_id)); +- err = -IP_ERROR_UNSUPPORTED_FILE_TYPE; +- break; +- } ++ frame->sample_rate = sf_get_rate(sf); ++ frame->format = out_sample_fmt; + +- /* We assume below that no more errors follow. */ +- } while (0); ++ /* NOTE: 10 sec is probably too much, but the amount of space ++ * needed for swr_convert() is unpredictable */ ++ frame->nb_samples = 10 * sf_get_rate(sf); ++ int res = av_frame_get_buffer(frame, 0); ++ if (res < 0) { ++ d_print("av_frame_get_buffer(): %s\n", ffmpeg_errmsg(res)); ++ return -IP_ERROR_INTERNAL; ++ } ++ priv->swr_frame_samples_cap = frame->nb_samples; ++ frame->nb_samples = 0; + +- if (err < 0) { +- /* Clean up. cc is never opened at this point. (See above assumption.) */ +-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 101) +- avcodec_free_context(&cc); +-#endif +- avformat_close_input(&ic); ++ priv->swr_frame = frame; ++ return 0; ++} ++ ++static void ffmpeg_free(struct ffmpeg_private *priv) ++{ ++ avcodec_free_context(&priv->codec_ctx); ++ avformat_close_input(&priv->format_ctx); ++ ++ swr_free(&priv->swr); ++ ++ av_frame_free(&priv->frame); ++ av_packet_free(&priv->pkt); ++ av_frame_free(&priv->swr_frame); ++} ++ ++static int ffmpeg_open(struct input_plugin_data *ip_data) ++{ ++ struct ffmpeg_private priv; ++ enum AVSampleFormat out_sample_fmt; ++ memset(&priv, 0, sizeof(struct ffmpeg_private)); ++ ++ ffmpeg_init(); ++ ++ int err = ffmpeg_open_input(ip_data, &priv); ++ if (err < 0) + return err; +- } + +- priv = xnew(struct ffmpeg_private, 1); +- priv->codec_context = cc; +- priv->input_context = ic; +- priv->codec = codec; +- priv->input = ffmpeg_input_create(); +- if (priv->input == NULL) { +- avcodec_close(cc); +-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 101) +- avcodec_free_context(&cc); +-#endif +- avformat_close_input(&ic); +- free(priv); +- return -IP_ERROR_INTERNAL; ++ priv.pkt = av_packet_alloc(); ++ priv.frame = av_frame_alloc(); ++ priv.seek_ts = -1; ++ ++ priv.swr = swr_alloc(); ++ ffmpeg_set_sf_and_swr_opts(priv.swr, priv.codec_ctx, ++ &ip_data->sf, &out_sample_fmt); ++ swr_init(priv.swr); ++ ++ err = ffmpeg_init_swr_frame(&priv, ip_data->sf, out_sample_fmt); ++ if (err < 0) { ++ ffmpeg_free(&priv); ++ return err; + } +- priv->input->stream_index = stream_index; +- priv->output = ffmpeg_output_create(); + +- /* Prepare for resampling. */ +- out_sample_rate = min_u(cc->sample_rate, 384000); +- swr = swr_alloc(); +-#if LIBAVCODEC_VERSION_MAJOR >= 60 +- if (cc->ch_layout.order == AV_CHANNEL_ORDER_UNSPEC) +- av_channel_layout_default(&cc->ch_layout, cc->ch_layout.nb_channels); +- av_opt_set_chlayout(swr, "in_chlayout", &cc->ch_layout, 0); +- av_opt_set_chlayout(swr, "out_chlayout", &cc->ch_layout, 0); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(59, 24, 100) ++ channel_map_init_waveex(priv.codec_ctx->ch_layout.nb_channels, ++ priv.codec_ctx->ch_layout.u.mask, ip_data->channel_map); + #else +- av_opt_set_int(swr, "in_channel_layout", av_get_default_channel_layout(cc->channels), 0); +- av_opt_set_int(swr, "out_channel_layout", av_get_default_channel_layout(cc->channels), 0); +-#endif +- av_opt_set_int(swr, "in_sample_rate", cc->sample_rate, 0); +- av_opt_set_int(swr, "out_sample_rate", out_sample_rate, 0); +- av_opt_set_sample_fmt(swr, "in_sample_fmt", cc->sample_fmt, 0); +- priv->swr = swr; +- +- ip_data->private = priv; +-#if LIBAVCODEC_VERSION_MAJOR >= 60 +- ip_data->sf = sf_rate(out_sample_rate) | sf_channels(cc->ch_layout.nb_channels); +-#else +- ip_data->sf = sf_rate(out_sample_rate) | sf_channels(cc->channels); +-#endif +- switch (cc->sample_fmt) { +- case AV_SAMPLE_FMT_U8: +- ip_data->sf |= sf_bits(8) | sf_signed(0); +- av_opt_set_sample_fmt(swr, "out_sample_fmt", AV_SAMPLE_FMT_U8, 0); +- break; +- case AV_SAMPLE_FMT_S32: +- ip_data->sf |= sf_bits(32) | sf_signed(1); +- av_opt_set_sample_fmt(swr, "out_sample_fmt", AV_SAMPLE_FMT_S32, 0); +- break; +- /* AV_SAMPLE_FMT_S16 */ +- default: +- ip_data->sf |= sf_bits(16) | sf_signed(1); +- av_opt_set_sample_fmt(swr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0); +- break; +- } +- swr_init(swr); +- ip_data->sf |= sf_host_endian(); +-#if LIBAVCODEC_VERSION_MAJOR >= 60 +- channel_map_init_waveex(cc->ch_layout.nb_channels, cc->ch_layout.u.mask, ip_data->channel_map); +-#else +- channel_map_init_waveex(cc->channels, cc->channel_layout, ip_data->channel_map); ++ channel_map_init_waveex(priv.codec_ctx->channels, ++ priv.codec_ctx->channel_layout, ip_data->channel_map); + #endif ++ ++ ip_data->private = xnew(struct ffmpeg_private, 1); ++ memcpy(ip_data->private, &priv, sizeof(struct ffmpeg_private)); + return 0; + } + + static int ffmpeg_close(struct input_plugin_data *ip_data) + { +- struct ffmpeg_private *priv = ip_data->private; +- +- avcodec_close(priv->codec_context); +-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 101) +- avcodec_free_context(&priv->codec_context); +-#endif +- avformat_close_input(&priv->input_context); +- swr_free(&priv->swr); +- ffmpeg_input_free(priv->input); +- ffmpeg_output_free(priv->output); +- free(priv); ++ ffmpeg_free(ip_data->private); ++ free(ip_data->private); + ip_data->private = NULL; + return 0; + } + +-/* +- * This returns the number of bytes added to the buffer. +- * It returns < 0 on error. 0 on EOF. +- */ +-static int ffmpeg_fill_buffer(struct input_plugin_data *ip_data, AVFormatContext *ic, AVCodecContext *cc, +- struct ffmpeg_input *input, struct ffmpeg_output *output, SwrContext *swr) ++static int64_t ffmpeg_calc_skip_samples(struct ffmpeg_private *priv) + { +-#if LIBAVCODEC_VERSION_MAJOR >= 56 +- AVFrame *frame = av_frame_alloc(); +-#else +- AVFrame *frame = avcodec_alloc_frame(); +-#endif +- int got_frame; +- while (1) { +- int len; +- +- if (input->curr_pkt_size <= 0) { +-#if LIBAVCODEC_VERSION_MAJOR >= 56 +- av_packet_unref(&input->pkt); +-#else +- av_free_packet(&input->pkt); +-#endif +- if (av_read_frame(ic, &input->pkt) < 0) { +- /* Force EOF once we can read no longer. */ +-#if LIBAVCODEC_VERSION_MAJOR >= 56 +- av_frame_free(&frame); +-#else +- avcodec_free_frame(&frame); +-#endif +- return 0; +- } +- if (input->pkt.stream_index == input->stream_index) { +- input->curr_pkt_size = input->pkt.size; +- input->curr_pkt_buf = input->pkt.data; +- input->curr_size += input->pkt.size; +- input->curr_duration += input->pkt.duration; +- } +- continue; +- } ++ int64_t ts; ++ if (priv->frame->pts >= 0) { ++ ts = priv->frame->pts; ++ } else if (priv->frame->pkt_dts >= 0) { ++ ts = priv->frame->pkt_dts; ++ } else { ++ d_print("AVFrame.pts and AVFrame.pkt_dts are unset\n"); ++ return -1; ++ } + +- { +- AVPacket avpkt; +- av_new_packet(&avpkt, input->curr_pkt_size); +- memcpy(avpkt.data, input->curr_pkt_buf, input->curr_pkt_size); +-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 101) +- int send_result = avcodec_send_packet(cc, &avpkt); +- if (send_result != 0) { +- if (send_result != AVERROR(EAGAIN)) { +- d_print("avcodec_send_packet() returned %d\n", send_result); +- char errstr[AV_ERROR_MAX_STRING_SIZE]; +- if (!av_strerror(send_result, errstr, AV_ERROR_MAX_STRING_SIZE )) +- { +- d_print("av_strerror(): %s\n", errstr); +- } else { +- d_print("av_strerror(): Description for error cannot be found\n"); +- } +- av_packet_unref(&avpkt); +- return -IP_ERROR_INTERNAL; +- } +- len = 0; +- } else { +- len = input->curr_pkt_size; +- } ++ AVStream *s = priv->format_ctx->streams[priv->stream_index]; ++ double frame_ts = ts * av_q2d(s->time_base); + +- int recv_result = avcodec_receive_frame(cc, frame); +- got_frame = (recv_result == 0) ? 1 : 0; +-#else +- len = avcodec_decode_audio4(cc, frame, &got_frame, &avpkt); +-#endif +-#if LIBAVCODEC_VERSION_MAJOR >= 56 +- av_packet_unref(&avpkt); +-#else +- av_free_packet(&avpkt); +-#endif +- } +- if (len < 0) { +- /* this is often reached when seeking, not sure why */ +- input->curr_pkt_size = 0; +- continue; +- } +- input->curr_pkt_size -= len; +- input->curr_pkt_buf += len; +- if (got_frame) { +- int res = swr_convert(swr, +- &output->buffer, +- frame->nb_samples, +- (const uint8_t **)frame->extended_data, +- frame->nb_samples); +- if (res < 0) +- res = 0; +- output->buffer_pos = output->buffer; +-#if LIBAVCODEC_VERSION_MAJOR >= 60 +- output->buffer_used_len = res * cc->ch_layout.nb_channels * sf_get_sample_size(ip_data->sf); +-#else +- output->buffer_used_len = res * cc->channels * sf_get_sample_size(ip_data->sf); +-#endif +-#if LIBAVCODEC_VERSION_MAJOR >= 56 +- av_frame_free(&frame); ++ d_print("seek_ts: %.6fs, frame_ts: %.6fs\n", priv->seek_ts, frame_ts); ++ ++ if (frame_ts >= priv->seek_ts) ++ return 0; ++ return (priv->seek_ts - frame_ts) * priv->frame->sample_rate; ++} ++ ++static void ffmpeg_skip_frame_part(struct ffmpeg_private *priv) ++{ ++ if (priv->skip_samples >= priv->frame->nb_samples) { ++ d_print("skipping frame: %d samples\n", ++ priv->frame->nb_samples); ++ priv->skip_samples -= priv->frame->nb_samples; ++ priv->frame->nb_samples = 0; ++ return; ++ } ++ ++ int bps = av_get_bytes_per_sample(priv->frame->format); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(59, 24, 100) ++ int channels = priv->codec_ctx->ch_layout.nb_channels; + #else +- avcodec_free_frame(&frame); ++ int channels = priv->codec_ctx->channels; + #endif +- return output->buffer_used_len; +- } ++ ++ priv->frame->nb_samples -= priv->skip_samples; ++ ++ /* Just modify frame's data pointer because it's throw-away */ ++ if (av_sample_fmt_is_planar(priv->frame->format)) { ++ for (int i = 0; i < channels; i++) ++ priv->frame->extended_data[i] += priv->skip_samples * bps; ++ } else { ++ priv->frame->extended_data[0] += priv->skip_samples * channels * bps; + } +- /* This should never get here. */ ++ d_print("skipping %lld samples\n", (long long)priv->skip_samples); ++ priv->skip_samples = 0; ++} ++ ++/* ++ * return: ++ * <0 - error ++ * 0 - eof ++ * >0 - ok ++ */ ++static int ffmpeg_get_frame(struct ffmpeg_private *priv) ++{ ++ int res; ++retry: ++ res = avcodec_receive_frame(priv->codec_ctx, priv->frame); ++ if (res == AVERROR(EAGAIN)) { ++ av_packet_unref(priv->pkt); ++ res = av_read_frame(priv->format_ctx, priv->pkt); ++ if (res < 0) ++ goto err; ++ ++ if (priv->pkt->stream_index != priv->stream_index) ++ goto retry; ++ ++ priv->curr_size += priv->pkt->size; ++ priv->curr_duration += priv->pkt->duration; ++ ++ res = avcodec_send_packet(priv->codec_ctx, priv->pkt); ++ if (res == 0 || res == AVERROR(EAGAIN)) ++ goto retry; ++ } ++ if (res < 0) ++ goto err; ++ ++ if (priv->seek_ts > 0) { ++ priv->skip_samples = ffmpeg_calc_skip_samples(priv); ++ if (priv->skip_samples >= 0) ++ priv->seek_ts = -1; ++ } ++ ++ if (priv->skip_samples > 0) { ++ ffmpeg_skip_frame_part(priv); ++ if (priv->frame->nb_samples == 0) ++ goto retry; ++ } ++ return 1; ++err: ++ if (res == AVERROR_EOF) ++ return 0; ++ d_print("%s\n", ffmpeg_errmsg(res)); ++ return -IP_ERROR_INTERNAL; ++} ++ ++static int ffmpeg_convert_frame(struct ffmpeg_private *priv) ++{ ++ int res = swr_convert(priv->swr, ++ priv->swr_frame->extended_data, ++ priv->swr_frame_samples_cap, ++ (const uint8_t **)priv->frame->extended_data, ++ priv->frame->nb_samples); ++ if (res >= 0) { ++ priv->swr_frame->nb_samples = res; ++ priv->swr_frame_start = 0; ++ return res; ++ } ++ d_print("%s\n", ffmpeg_errmsg(res)); + return -IP_ERROR_INTERNAL; + } + + static int ffmpeg_read(struct input_plugin_data *ip_data, char *buffer, int count) + { + struct ffmpeg_private *priv = ip_data->private; +- struct ffmpeg_output *output = priv->output; +- int rc; +- int out_size; +- +- if (output->buffer_used_len == 0) { +- rc = ffmpeg_fill_buffer(ip_data, priv->input_context, priv->codec_context, +- priv->input, priv->output, priv->swr); +- if (rc <= 0) { +- return rc; ++ int written = 0; ++ int res; ++ ++ count /= sf_get_frame_size(ip_data->sf); ++ ++ while (count) { ++ if (priv->swr_frame->nb_samples == 0) { ++ res = ffmpeg_get_frame(priv); ++ if (res == 0) ++ break; ++ else if (res < 0) ++ return res; ++ ++ res = ffmpeg_convert_frame(priv); ++ if (res < 0) ++ return res; + } ++ ++ int copy_frames = min_i(count, priv->swr_frame->nb_samples); ++ int copy_bytes = copy_frames * sf_get_frame_size(ip_data->sf); ++ void *dst = priv->swr_frame->extended_data[0] + priv->swr_frame_start; ++ memcpy(buffer + written, dst, copy_bytes); ++ ++ priv->swr_frame->nb_samples -= copy_frames; ++ priv->swr_frame_start += copy_bytes; ++ count -= copy_frames; ++ written += copy_bytes; + } +- out_size = min_i(output->buffer_used_len, count); +- memcpy(buffer, output->buffer_pos, out_size); +- output->buffer_used_len -= out_size; +- output->buffer_pos += out_size; +- return out_size; ++ return written; + } + + static int ffmpeg_seek(struct input_plugin_data *ip_data, double offset) + { + struct ffmpeg_private *priv = ip_data->private; +- AVStream *st = priv->input_context->streams[priv->input->stream_index]; +- int ret; ++ AVStream *st = priv->format_ctx->streams[priv->stream_index]; + +- int64_t pts = av_rescale_q(offset * AV_TIME_BASE, AV_TIME_BASE_Q, st->time_base); +- +- avcodec_flush_buffers(priv->codec_context); +- /* Force reading a new packet in next ffmpeg_fill_buffer(). */ +- priv->input->curr_pkt_size = 0; +- +- ret = av_seek_frame(priv->input_context, priv->input->stream_index, pts, 0); +- +- if (ret < 0) { ++ priv->seek_ts = offset; ++ priv->skip_samples = 0; ++ int64_t ts = offset / av_q2d(st->time_base); ++ ++ int ret = avformat_seek_file(priv->format_ctx, ++ priv->stream_index, 0, ts, ts, 0); ++ if (ret < 0) + return -IP_ERROR_FUNCTION_NOT_SUPPORTED; +- } else { +- ffmpeg_buffer_flush(priv->output); +- return 0; +- } ++ ++ priv->swr_frame->nb_samples = 0; ++ priv->swr_frame_start = 0; ++ avcodec_flush_buffers(priv->codec_ctx); ++ swr_convert(priv->swr, NULL, 0, NULL, 0); /* flush swr buffer */ ++ return 0; + } + + static void ffmpeg_read_metadata(struct growing_keyvals *c, AVDictionary *metadata) +@@ -463,10 +461,11 @@ + } + } + +-static int ffmpeg_read_comments(struct input_plugin_data *ip_data, struct keyval **comments) ++static int ffmpeg_read_comments(struct input_plugin_data *ip_data, ++ struct keyval **comments) + { + struct ffmpeg_private *priv = ip_data->private; +- AVFormatContext *ic = priv->input_context; ++ AVFormatContext *ic = priv->format_ctx; + + GROWING_KEYVALS(c); + +@@ -484,33 +483,29 @@ + static int ffmpeg_duration(struct input_plugin_data *ip_data) + { + struct ffmpeg_private *priv = ip_data->private; +- return priv->input_context->duration / AV_TIME_BASE; ++ return priv->format_ctx->duration / AV_TIME_BASE; + } + + static long ffmpeg_bitrate(struct input_plugin_data *ip_data) + { + struct ffmpeg_private *priv = ip_data->private; +- long bitrate = priv->input_context->bit_rate; ++ long bitrate = priv->format_ctx->bit_rate; + return bitrate ? bitrate : -IP_ERROR_FUNCTION_NOT_SUPPORTED; + } + + static long ffmpeg_current_bitrate(struct input_plugin_data *ip_data) + { + struct ffmpeg_private *priv = ip_data->private; +- AVStream *st = priv->input_context->streams[priv->input->stream_index]; ++ AVStream *st = priv->format_ctx->streams[priv->stream_index]; + long bitrate = -1; + /* ape codec returns silly numbers */ +-#if LIBAVCODEC_VERSION_MAJOR >= 55 + if (priv->codec->id == AV_CODEC_ID_APE) +-#else +- if (priv->codec->id == CODEC_ID_APE) +-#endif + return -1; +- if (priv->input->curr_duration > 0) { +- double seconds = priv->input->curr_duration * av_q2d(st->time_base); +- bitrate = (8 * priv->input->curr_size) / seconds; +- priv->input->curr_size = 0; +- priv->input->curr_duration = 0; ++ if (priv->curr_duration > 0) { ++ double seconds = priv->curr_duration * av_q2d(st->time_base); ++ bitrate = (8 * priv->curr_size) / seconds; ++ priv->curr_size = 0; ++ priv->curr_duration = 0; + } + return bitrate; + } +@@ -525,7 +520,7 @@ + { + struct ffmpeg_private *priv = ip_data->private; + const char *profile; +- profile = av_get_profile_name(priv->codec, priv->codec_context->profile); ++ profile = av_get_profile_name(priv->codec, priv->codec_ctx->profile); + return profile ? xstrdup(profile) : NULL; + } + diff --git a/srcpkgs/cmus/template b/srcpkgs/cmus/template index 8219d929c136ac..761bc7102d1f57 100644 --- a/srcpkgs/cmus/template +++ b/srcpkgs/cmus/template @@ -1,14 +1,14 @@ # Template file for 'cmus' pkgname=cmus version=2.12.0 -revision=2 +revision=3 build_style=configure configure_args="prefix=/usr LD=$CC" hostmakedepends="pkg-config" makedepends="ncurses-devel faad2-devel libcdio-devel libcdio-paranoia-devel libcddb-devel libdiscid-devel libflac-devel libao-devel libmad-devel libmodplug-devel libmp4v2-devel libmpcdec-devel pulseaudio-devel - opusfile-devel wavpack-devel alsa-lib-devel libvorbis-devel ffmpeg6-devel + opusfile-devel wavpack-devel alsa-lib-devel libvorbis-devel ffmpeg-devel sndio-devel jack-devel $(vopt_if elogind elogind-devel)" short_desc="Small, fast and powerful console music player" maintainer="Orphaned " From c7331e485db884afff1b137de3699e0de17ce25d Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 018/115] cyanrip: revbump for ffmpeg9 --- srcpkgs/cyanrip/patches/ffmpeg9.patch | 237 ++++++++++++++++++++++++++ srcpkgs/cyanrip/template | 4 +- 2 files changed, 239 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/cyanrip/patches/ffmpeg9.patch diff --git a/srcpkgs/cyanrip/patches/ffmpeg9.patch b/srcpkgs/cyanrip/patches/ffmpeg9.patch new file mode 100644 index 00000000000000..e2c93851ee6fee --- /dev/null +++ b/srcpkgs/cyanrip/patches/ffmpeg9.patch @@ -0,0 +1,237 @@ +From 7dbbe1122248e91510351900af84a6f7c0464271 Mon Sep 17 00:00:00 2001 +From: Lynne +Date: Sun, 12 Jul 2026 19:18:46 +0900 +Subject: [PATCH] Support the FFmpeg 7.1+ codec and buffersink APIs + +FFmpeg master (lavc 63) removed AVCodec.ch_layouts/sample_fmts/ +supported_samplerates and the buffersink int-list options that were +deprecated in 7.1. Query codec capabilities through +avcodec_get_supported_config() and configure the buffersink via +av_opt_set_array() on lavc >= 61.13.100/lavfi >= 10.6.100, keeping +the old paths for older FFmpeg. + +The buffersink is now allocated, configured and then initialized +explicitly, as setting non-runtime options on an initialized object +is rejected since FFmpeg 8.0. This is what broke -E and HDCD/ +deemphasis ripping in general against FFmpeg 8: +"Error setting filter sample format: Invalid argument!" + +Closes #137 +Closes #142 + +Co-Authored-By: Claude Fable 5 +Claude-Session: https://claude.ai/code/session_014GYNg8856YE285XHQSF1ZV +--- + src/cyanrip_encode.c | 115 ++++++++++++++++++++++++++++++++++--------- + 1 file changed, 92 insertions(+), 23 deletions(-) + +diff --git a/src/cyanrip_encode.c b/src/cyanrip_encode.c +index 23e9af06..910e8083 100644 +--- a/src/cyanrip_encode.c ++++ b/src/cyanrip_encode.c +@@ -132,6 +132,31 @@ const char *cyanrip_fmt_folder(enum cyanrip_output_formats format) + return format < CYANRIP_FORMATS_NB ? crip_fmt_info[format].folder_suffix : NULL; + } + ++/* The AVCodec.ch_layouts/sample_fmts/supported_samplerates fields were ++ * replaced by avcodec_get_supported_config() in lavc 61.13.100 (FFmpeg 7.1) ++ * and later removed. All lists remain terminated, so NULL still means ++ * "supports anything". */ ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 13, 100) ++static const void *codec_supported_config(const AVCodec *codec, ++ enum AVCodecConfig config) ++{ ++ const void *list = NULL; ++ if (avcodec_get_supported_config(NULL, codec, config, 0, &list, NULL) < 0) ++ return NULL; ++ return list; ++} ++#define CODEC_CH_LAYOUTS(codec) \ ++ ((const AVChannelLayout *)codec_supported_config(codec, AV_CODEC_CONFIG_CHANNEL_LAYOUT)) ++#define CODEC_SAMPLE_FMTS(codec) \ ++ ((const enum AVSampleFormat *)codec_supported_config(codec, AV_CODEC_CONFIG_SAMPLE_FORMAT)) ++#define CODEC_SAMPLERATES(codec) \ ++ ((const int *)codec_supported_config(codec, AV_CODEC_CONFIG_SAMPLE_RATE)) ++#else ++#define CODEC_CH_LAYOUTS(codec) ((codec)->ch_layouts) ++#define CODEC_SAMPLE_FMTS(codec) ((codec)->sample_fmts) ++#define CODEC_SAMPLERATES(codec) ((codec)->supported_samplerates) ++#endif ++ + static AVChannelLayout pick_codec_channel_layout(const AVCodec *codec) + { + int i = 0; +@@ -139,17 +164,18 @@ static AVChannelLayout pick_codec_channel_layout(const AVCodec *codec) + AVChannelLayout ilayout = AV_CHANNEL_LAYOUT_STEREO; + int in_channels = ilayout.nb_channels; + AVChannelLayout best_layout = { 0 }; ++ const AVChannelLayout *ch_layouts = CODEC_CH_LAYOUTS(codec); + + /* Supports anything */ +- if (!codec->ch_layouts) ++ if (!ch_layouts) + return ilayout; + + /* Try to match */ + while (1) { +- if (!codec->ch_layouts[i].nb_channels) ++ if (!ch_layouts[i].nb_channels) + break; +- if (!av_channel_layout_compare(&codec->ch_layouts[i], &ilayout)) +- return codec->ch_layouts[i]; ++ if (!av_channel_layout_compare(&ch_layouts[i], &ilayout)) ++ return ch_layouts[i]; + i++; + } + +@@ -157,15 +183,15 @@ static AVChannelLayout pick_codec_channel_layout(const AVCodec *codec) + + /* Try to match channel counts */ + while (1) { +- if (!codec->ch_layouts[i].nb_channels) ++ if (!ch_layouts[i].nb_channels) + break; +- int num = codec->ch_layouts[i].nb_channels; ++ int num = ch_layouts[i].nb_channels; + if (num > max_channels) { + max_channels = num; +- best_layout = codec->ch_layouts[i]; ++ best_layout = ch_layouts[i]; + } + if (num >= in_channels) +- return codec->ch_layouts[i]; ++ return ch_layouts[i]; + i++; + } + +@@ -184,19 +210,21 @@ static enum AVSampleFormat pick_codec_sample_fmt(const AVCodec *codec, int hdcd) + AV_SAMPLE_FMT_S16P; + enum AVSampleFormat max_bps_fmt = AV_SAMPLE_FMT_NONE; + ++ const enum AVSampleFormat *sample_fmts = CODEC_SAMPLE_FMTS(codec); ++ + ibps = ibps >> 3; + + /* Accepts anything */ +- if (!codec->sample_fmts) ++ if (!sample_fmts) + return ifmt; + + /* Try to match the input sample format first */ + while (1) { +- if (codec->sample_fmts[i] == AV_SAMPLE_FMT_NONE) ++ if (sample_fmts[i] == AV_SAMPLE_FMT_NONE) + break; +- if (codec->sample_fmts[i] == ifmt || +- codec->sample_fmts[i] == ifmt_p) +- return codec->sample_fmts[i]; ++ if (sample_fmts[i] == ifmt || ++ sample_fmts[i] == ifmt_p) ++ return sample_fmts[i]; + i++; + } + +@@ -204,15 +232,15 @@ static enum AVSampleFormat pick_codec_sample_fmt(const AVCodec *codec, int hdcd) + + /* Try to match bits per sample */ + while (1) { +- if (codec->sample_fmts[i] == -1) ++ if (sample_fmts[i] == -1) + break; +- int bps = av_get_bytes_per_sample(codec->sample_fmts[i]); ++ int bps = av_get_bytes_per_sample(sample_fmts[i]); + if (bps > max_bps) { + max_bps = bps; +- max_bps_fmt = codec->sample_fmts[i]; ++ max_bps_fmt = sample_fmts[i]; + } + if (bps == ibps) +- return codec->sample_fmts[i]; ++ return sample_fmts[i]; + i++; + } + +@@ -224,15 +252,16 @@ static int pick_codec_sample_rate(const AVCodec *codec) + { + int i = 0, ret; + int irate = 44100; ++ const int *samplerates = CODEC_SAMPLERATES(codec); + +- if (!codec->supported_samplerates) ++ if (!samplerates) + return irate; + + /* Go to the array terminator (0) */ +- while (codec->supported_samplerates[++i] > 0); ++ while (samplerates[++i] > 0); + /* Alloc, copy and sort array upwards */ + int *tmp = av_malloc(i*sizeof(int)); +- memcpy(tmp, codec->supported_samplerates, i*sizeof(int)); ++ memcpy(tmp, samplerates, i*sizeof(int)); + qsort(tmp, i, sizeof(int), cmp_numbers); + + /* Pick lowest one above the input rate, otherwise just use the highest one */ +@@ -327,13 +356,46 @@ static int init_filtering(cyanrip_ctx *ctx, cyanrip_filt_ctx *s, + + if (!peak) { + const AVFilter *abuffersink = avfilter_get_by_name("abuffersink"); +- ret = avfilter_graph_create_filter(&s->buffersink_ctx, abuffersink, "out", +- NULL, NULL, s->graph); +- if (ret < 0) { ++ /* Options must be set between allocation and init, non-runtime ++ * option changes on initialized objects are rejected */ ++ s->buffersink_ctx = avfilter_graph_alloc_filter(s->graph, abuffersink, "out"); ++ if (!s->buffersink_ctx) { ++ ret = AVERROR(ENOMEM); + cyanrip_log(ctx, 0, "Error creating filter sink: %s!\n", av_err2str(ret)); + goto fail; + } + ++#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(10, 6, 100) ++ /* Buffersink switched to array-type options in lavfi 10.6.100 ++ * (FFmpeg 7.1); the int-list options were later removed */ ++ if (hdcd || deemphasis) { ++ const enum AVSampleFormat out_sample_fmt = hdcd ? AV_SAMPLE_FMT_S32 : ++ AV_SAMPLE_FMT_DBLP; ++ ret = av_opt_set_array(s->buffersink_ctx, "sample_formats", ++ AV_OPT_SEARCH_CHILDREN, 0, 1, ++ AV_OPT_TYPE_SAMPLE_FMT, &out_sample_fmt); ++ if (ret < 0) { ++ cyanrip_log(ctx, 0, "Error setting filter sample format: %s!\n", av_err2str(ret)); ++ goto fail; ++ } ++ } ++ ++ ret = av_opt_set(s->buffersink_ctx, "channel_layouts", "stereo", ++ AV_OPT_SEARCH_CHILDREN); ++ if (ret < 0) { ++ cyanrip_log(ctx, 0, "Error setting filter channel layout: %s!\n", av_err2str(ret)); ++ goto fail; ++ } ++ ++ const int out_sample_rate = 44100; ++ ret = av_opt_set_array(s->buffersink_ctx, "samplerates", ++ AV_OPT_SEARCH_CHILDREN, 0, 1, ++ AV_OPT_TYPE_INT, &out_sample_rate); ++ if (ret < 0) { ++ cyanrip_log(ctx, 0, "Error setting filter sample rate: %s!\n", av_err2str(ret)); ++ goto fail; ++ } ++#else + static const enum AVSampleFormat out_sample_fmts_hdcd[] = { AV_SAMPLE_FMT_S32, -1 }; + static const enum AVSampleFormat out_sample_fmts_deemph[] = { AV_SAMPLE_FMT_DBLP, -1 }; + +@@ -360,6 +422,13 @@ static int init_filtering(cyanrip_ctx *ctx, cyanrip_filt_ctx *s, + cyanrip_log(ctx, 0, "Error setting filter sample rate: %s!\n", av_err2str(ret)); + goto fail; + } ++#endif ++ ++ ret = avfilter_init_str(s->buffersink_ctx, NULL); ++ if (ret < 0) { ++ cyanrip_log(ctx, 0, "Error initializing filter sink: %s!\n", av_err2str(ret)); ++ goto fail; ++ } + } + + outputs = avfilter_inout_alloc(); diff --git a/srcpkgs/cyanrip/template b/srcpkgs/cyanrip/template index 62f54cea3a5f78..728e20fe43efc4 100644 --- a/srcpkgs/cyanrip/template +++ b/srcpkgs/cyanrip/template @@ -1,10 +1,10 @@ # Template file for 'cyanrip' pkgname=cyanrip version=0.9.3.1 -revision=1 +revision=2 build_style=meson hostmakedepends="pkg-config" -makedepends="ffmpeg6-devel libcdio-devel libcdio-paranoia-devel libcurl-devel libmusicbrainz5-devel" +makedepends="ffmpeg-devel libcdio-devel libcdio-paranoia-devel libcurl-devel libmusicbrainz5-devel" short_desc="Bule-ish CD ripper" maintainer="Duncaen " license="LGPL-2.1-or-later" From c0ce3e5ec9aa96a3c9f606f81e200efd713a3526 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 019/115] dragon-player: revbump for ffmpeg9 --- srcpkgs/dragon-player/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/dragon-player/template b/srcpkgs/dragon-player/template index 03bcef093e1140..fa2b54b22045de 100644 --- a/srcpkgs/dragon-player/template +++ b/srcpkgs/dragon-player/template @@ -2,7 +2,7 @@ # group=kde-gear pkgname=dragon-player version=26.08.0 -revision=2 +revision=3 build_style=cmake configure_args="-DBUILD_TESTING=OFF -DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins @@ -12,7 +12,7 @@ hostmakedepends="extra-cmake-modules pkg-config qt6-base qt6-tools qt6-declarative-host-tools" makedepends="kf6-kio-devel kf6-kparts-devel kf6-kirigami-devel kf6-kdoctools-devel kf6-kcoreaddons-devel qt6-multimedia-devel - kf6-kcrash-devel ffmpeg6-devel" + kf6-kcrash-devel ffmpeg-devel" depends="hicolor-icon-theme kf6-kirigami" short_desc="Multimedia player where the focus is on simplicity" maintainer="John " From 1764cdd2b5b58899d9197161942841ac9fe5dbb3 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 020/115] ffmpegthumbs: revbump for ffmpeg9 --- srcpkgs/ffmpegthumbs/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/ffmpegthumbs/template b/srcpkgs/ffmpegthumbs/template index 9de87d2a41c8e0..11f77f66e75242 100644 --- a/srcpkgs/ffmpegthumbs/template +++ b/srcpkgs/ffmpegthumbs/template @@ -2,14 +2,14 @@ # group=kde-gear pkgname=ffmpegthumbs version=26.08.0 -revision=1 +revision=2 build_style=cmake configure_args="-DQT_MAJOR_VERSION=6 -DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins" hostmakedepends="extra-cmake-modules pkg-config gettext qt6-base kf6-kconfig" makedepends="qt6-base-devel kf6-kconfig-devel kf6-kio-devel kf6-ki18n-devel - ffmpeg6-devel taglib-devel" + ffmpeg-devel taglib-devel" short_desc="FFmpeg-based thumbnail creator for video files" maintainer="Michael Straube " license="GPL-2.0-or-later" From cf3d9ffbd8b5ffaacad560a30621d875c7b896df Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 021/115] gerbera: revbump for ffmpeg9 --- srcpkgs/gerbera/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/gerbera/template b/srcpkgs/gerbera/template index 3b7bc65599cff1..9522f0aa1e37ad 100644 --- a/srcpkgs/gerbera/template +++ b/srcpkgs/gerbera/template @@ -1,11 +1,11 @@ # Template file for 'gerbera' pkgname=gerbera version=2.5.0 -revision=3 +revision=4 build_style=cmake configure_args="-DWITH_SYSTEMD=OFF -DWITH_AVCODEC=ON -DWITH_NPUPNP=ON" hostmakedepends="pkg-config" -makedepends="duktape-devel expat-devel ffmpeg6-devel file-devel libcurl-devel +makedepends="duktape-devel expat-devel ffmpeg-devel file-devel libcurl-devel libexif-devel libnpupnp-devel libuuid-devel sqlite-devel taglib-devel fmt-devel spdlog pugixml-devel libebml-devel libmatroska-devel exiv2-devel" short_desc="UPnP Media Server based on MediaTomb" From 62fef7c4317cf66bfdf0d7352d0828122aba993a Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 022/115] gifski: revbump for ffmpeg9 --- srcpkgs/gifski/patches/ffmpeg9.patch | 17 +++++++++ srcpkgs/gifski/patches/fix-cross-build.patch | 40 -------------------- srcpkgs/gifski/template | 10 ++--- 3 files changed, 22 insertions(+), 45 deletions(-) create mode 100644 srcpkgs/gifski/patches/ffmpeg9.patch delete mode 100644 srcpkgs/gifski/patches/fix-cross-build.patch diff --git a/srcpkgs/gifski/patches/ffmpeg9.patch b/srcpkgs/gifski/patches/ffmpeg9.patch new file mode 100644 index 00000000000000..fff1392219908a --- /dev/null +++ b/srcpkgs/gifski/patches/ffmpeg9.patch @@ -0,0 +1,17 @@ +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -45,7 +45,7 @@ + + [dependencies.ffmpeg] + package = "ffmpeg-next" +-version = "6" ++version = "9" + optional = true + default-features = false + features = ["codec", "format", "filter", "software-resampling", "software-scaling"] +@@ -100,4 +100,4 @@ + + [patch.crates-io] + # ffmpeg-sys-next does not support cross-compilation, which I use to produce binaries https://github.com/zmwangx/rust-ffmpeg-sys/pull/30 +-ffmpeg-sys-next = { rev = "fd5784d645df2ebe022a204ac36582074da1edf7", git = "https://github.com/kornelski/rust-ffmpeg-sys-1"} ++ffmpeg-sys-next = { rev = "80b7dd8327c3539159f37d8ca5423c75d6cd2e57", git = "https://github.com/zmwangx/rust-ffmpeg-sys"} diff --git a/srcpkgs/gifski/patches/fix-cross-build.patch b/srcpkgs/gifski/patches/fix-cross-build.patch deleted file mode 100644 index de7fd8ccd1b82e..00000000000000 --- a/srcpkgs/gifski/patches/fix-cross-build.patch +++ /dev/null @@ -1,40 +0,0 @@ -Instead of using the host compiler to build and run -the "check" binary on the host, use the target compiler -and run it through qemu. ---- a/vendor/ffmpeg-sys-next-6.1.0/build.rs -+++ b/vendor/ffmpeg-sys-next-6.1.0/build.rs -@@ -500,7 +500,7 @@ - - let executable = out_dir.join(if cfg!(windows) { "check.exe" } else { "check" }); - let mut compiler = cc::Build::new() -- .target(&env::var("HOST").unwrap()) // don't cross-compile this -+ .target(&env::var("TARGET").unwrap()) // don't cross-compile this - .get_compiler() - .to_command(); - -@@ -520,10 +520,21 @@ - panic!("Compile failed"); - } - -- let check_output = Command::new(out_dir.join(&executable)) -- .current_dir(&out_dir) -- .output() -- .expect("Check failed"); -+ let check_output = match env::var("XBPS_TARGET_QEMU_MACHINE") { -+ Ok(qemu_machine) => { -+ Command::new(format!("qemu-{}", qemu_machine)) -+ .args([out_dir.join(&executable)]) -+ .current_dir(&out_dir) -+ .output() -+ .expect("Check failed") -+ } -+ _ => { -+ Command::new(out_dir.join(&executable)) -+ .current_dir(&out_dir) -+ .output() -+ .expect("Check failed") -+ } -+ }; - if !check_output.status.success() { - panic!( - "{} failed: {}\n{}", diff --git a/srcpkgs/gifski/template b/srcpkgs/gifski/template index 70e26fb4133c45..e730b0055de086 100644 --- a/srcpkgs/gifski/template +++ b/srcpkgs/gifski/template @@ -1,12 +1,12 @@ # Template file for 'gifski' pkgname=gifski version=1.34.0 -revision=2 +revision=3 build_helper="qemu" build_style=cargo configure_args="$(vopt_if ffmpeg --features=video)" hostmakedepends="pkg-config $(vopt_if ffmpeg clang21-devel)" -makedepends="$(vopt_if ffmpeg ffmpeg6-devel)" +makedepends="$(vopt_if ffmpeg ffmpeg-devel)" short_desc="Highest-quality GIF encoder based on pngquant" maintainer="Orphaned " license="AGPL-3.0-only" @@ -22,10 +22,10 @@ build_options_default="ffmpeg" _clear_vendor_checksums() { sed -i 's/\("files":{\)[^}]*/\1/' vendor/$1/.cargo-checksum.json } -post_extract() { +post_patch() { mkdir -p .cargo - cargo vendor --locked --versioned-dirs >.cargo/config.toml - _clear_vendor_checksums ffmpeg-sys-next-6.1.0 + cargo vendor --versioned-dirs >.cargo/config.toml + _clear_vendor_checksums ffmpeg-sys-next-9.0.0 } _setup_env() { From 6cc1d31a4bad1f4cdbd4ee09950df420ee728a29 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 023/115] goldendict-ng: revbump for ffmpeg9 --- srcpkgs/goldendict-ng/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/goldendict-ng/template b/srcpkgs/goldendict-ng/template index faf4480b5b4a19..1261e59003313d 100644 --- a/srcpkgs/goldendict-ng/template +++ b/srcpkgs/goldendict-ng/template @@ -1,11 +1,11 @@ # Template file for 'goldendict-ng' pkgname=goldendict-ng version=26.8.0 -revision=1 +revision=2 build_style=cmake configure_args="-DUSE_ALTERNATIVE_NAME=ON -DWITH_TTS=OFF" hostmakedepends="pkg-config qt6-declarative-host-tools qt6-tools" -makedepends="ffmpeg6-devel fmt-devel hunspell-devel libeb-devel libvorbis-devel +makedepends="ffmpeg-devel fmt-devel hunspell-devel libeb-devel libvorbis-devel libzim-devel opencc-devel qt6-base-devel qt6-declarative-devel qt6-multimedia-devel qt6-qt5compat-devel qt6-svg-devel qt6-webengine-devel xapian-core-devel tomlplusplus-devel" From d6e87cb5ae272d238b9b47329b78a915c7622384 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 024/115] goldendict: revbump for ffmpeg9 --- srcpkgs/goldendict/patches/ffmpeg8.patch | 13 +++++++++++++ srcpkgs/goldendict/template | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/goldendict/patches/ffmpeg8.patch diff --git a/srcpkgs/goldendict/patches/ffmpeg8.patch b/srcpkgs/goldendict/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..91bfb59df7beca --- /dev/null +++ b/srcpkgs/goldendict/patches/ffmpeg8.patch @@ -0,0 +1,13 @@ +--- a/ffmpegaudio.cc ++++ b/ffmpegaudio.cc +@@ -350,8 +350,9 @@ + if ( audioStream_ && codecContext_ && codec_ ) + { + audioStream_->discard = AVDISCARD_ALL; ++#if LIBAVCODEC_VERSION_MAJOR < 62 + avcodec_close( codecContext_ ); +-#if LIBAVCODEC_VERSION_MAJOR > 57 || ( LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR >= 33 ) ++#elif LIBAVCODEC_VERSION_MAJOR > 57 || ( LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR >= 33 ) + avcodec_free_context( &codecContext_ ); + #endif + } diff --git a/srcpkgs/goldendict/template b/srcpkgs/goldendict/template index 41a36ea1ec2193..7c3ff1235c819f 100644 --- a/srcpkgs/goldendict/template +++ b/srcpkgs/goldendict/template @@ -1,14 +1,14 @@ # Template file for 'goldendict' pkgname=goldendict version=1.5.1 -revision=2 +revision=3 build_style=qmake configure_args="CONFIG+=zim_support goldendict.pro" hostmakedepends="qt5-qmake pkg-config qt5-host-tools" makedepends="tiff-devel qt5-devel libvorbis-devel zlib-devel libXtst-devel hunspell-devel qt5-tools-devel qt5-declarative-devel qt5-webkit-devel lzo-devel bzip2-devel libao-devel qt5-svg-devel - libeb-devel qt5-x11extras-devel ffmpeg6-devel liblzma-devel + libeb-devel qt5-x11extras-devel ffmpeg-devel liblzma-devel qt5-multimedia-devel" short_desc="Feature-rich dictionary lookup program" maintainer="John " From 49052507b1ef5a562a2c3f213b118af81fb00937 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 025/115] gst-libav: revbump for ffmpeg9 --- srcpkgs/gst-libav/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/gst-libav/template b/srcpkgs/gst-libav/template index 07dc1c8f8ba3a9..967b00405ec8c4 100644 --- a/srcpkgs/gst-libav/template +++ b/srcpkgs/gst-libav/template @@ -1,10 +1,10 @@ # Template file for 'gst-libav' pkgname=gst-libav version=1.28.6 -revision=1 +revision=2 build_style=meson hostmakedepends="pkg-config yasm" -makedepends="orc-devel gst-plugins-base1-devel ffmpeg6-devel" +makedepends="orc-devel gst-plugins-base1-devel ffmpeg-devel" depends="orc>=0.4.18 gst-plugins-base1>=${version}" short_desc="GStreamer libav plugin (1.x)" maintainer="Orphaned " From 3e23f5e5191358de32718cbb4756c1fd1b7d4778 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 026/115] gst-plugins-bad1: revbump for ffmpeg9 --- srcpkgs/gst-plugins-bad1/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/gst-plugins-bad1/template b/srcpkgs/gst-plugins-bad1/template index 10ee1868d4adca..b6e84ceb22a5bb 100644 --- a/srcpkgs/gst-plugins-bad1/template +++ b/srcpkgs/gst-plugins-bad1/template @@ -1,7 +1,7 @@ # Template file for 'gst-plugins-bad1' pkgname=gst-plugins-bad1 version=1.28.6 -revision=1 +revision=2 build_helper="gir" build_style=meson configure_args="-Dpackage-origin=https://voidlinux.org -Ddoc=disabled @@ -26,7 +26,7 @@ makedepends="alsa-lib-devel celt-devel openssl-devel exempi-devel libgudev-devel libusb-devel libaom-devel libbs2b-devel chromaprint-devel fdk-aac-devel flite-devel fluidsynth-devel liblrdf-devel ladspa-sdk lilv-devel lv2 libopenjpeg2-devel sbc-devel spandsp-devel vulkan-loader-devel - webrtc-audio-processing-devel libzbar-devel ffmpeg6-devel nv-codec-headers + webrtc-audio-processing-devel libzbar-devel ffmpeg-devel nv-codec-headers srt-devel libva-devel openh264-devel $(vopt_if libvpl libvpl-devel) $(vopt_if gme libgme-devel)" depends="gst-plugins-base1>=${version}" From 884ad9b4a6764ddc49ef6cc30ab3182d21fac4af Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 027/115] gst-rtsp-server: revbump for ffmpeg9 --- srcpkgs/gst-rtsp-server/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/gst-rtsp-server/template b/srcpkgs/gst-rtsp-server/template index a84b25df372320..689a87f33d9024 100644 --- a/srcpkgs/gst-rtsp-server/template +++ b/srcpkgs/gst-rtsp-server/template @@ -1,12 +1,12 @@ # Template file for 'gst-rtsp-server' pkgname=gst-rtsp-server version=1.28.6 -revision=1 +revision=2 build_style=meson build_helper=gir configure_args="-Dintrospection=enabled" hostmakedepends="pkg-config python3" -makedepends="glib-devel gst-plugins-bad1-devel gst-plugins-good1 ffmpeg6-devel +makedepends="glib-devel gst-plugins-bad1-devel gst-plugins-good1 ffmpeg-devel python3-gobject-devel" short_desc="GStreamer multimedia graph framework - rtsp server" maintainer="1is7ac3 " From 8aa3238644d3928bc63908c4e1c4ac3d7ce1b871 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 028/115] k3b: revbump for ffmpeg9 --- srcpkgs/k3b/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/k3b/template b/srcpkgs/k3b/template index c368c3e5aec03b..beb899fd25b34e 100644 --- a/srcpkgs/k3b/template +++ b/srcpkgs/k3b/template @@ -2,7 +2,7 @@ # group=kde-gear pkgname=k3b version=26.08.0 -revision=1 +revision=2 build_style=cmake configure_args="-DBUILD_TESTING=OFF -DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins -DQT_MAJOR_VERSION=6 @@ -16,7 +16,7 @@ makedepends="kf6-kcmutils-devel kf6-kfilemetadata-devel kf6-knewstuff-devel kf6-karchive-devel kf6-kconfig-devel kf6-kcoreaddons-devel kf6-ki18n-devel kf6-kiconthemes-devel kf6-kjobwidgets-devel kf6-knotifications-devel kf6-kwidgetsaddons-devel kf6-kxmlgui-devel taglib-devel - ffmpeg6-devel libflac-devel libsndfile-devel lame-devel + ffmpeg-devel libflac-devel libsndfile-devel lame-devel libmusicbrainz5-devel libsamplerate-devel kf6-kauth-devel" depends="cdrdao cdrtools dvd+rw-tools" short_desc="CD/DVD Kreator for Linux" From 5bebc9f2e5c0cb2b961fd8b5372971b01c1c2536 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 029/115] kew: revbump for ffmpeg9 --- srcpkgs/kew/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/kew/template b/srcpkgs/kew/template index a2c3f553422c57..781d084d5862ec 100644 --- a/srcpkgs/kew/template +++ b/srcpkgs/kew/template @@ -1,11 +1,11 @@ # Template file for 'kew' pkgname=kew version=4.3.2 -revision=1 +revision=2 build_style=gnu-makefile make_use_env=yes hostmakedepends="pkg-config" -makedepends="faad2-devel libnotify-devel taglib-devel chafa-devel ffmpeg6-devel fftw-devel +makedepends="faad2-devel libnotify-devel taglib-devel chafa-devel ffmpeg-devel fftw-devel freeimage-devel libglib-devel libogg-devel libvorbis-devel opus-devel opusfile-devel libcurl-devel" short_desc="Command-line music player" From a38ecc13f54f1a30048ba85a6913fcc4a22c787b Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 030/115] kf6-kfilemetadata: revbump for ffmpeg9 --- srcpkgs/kf6-kfilemetadata/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/kf6-kfilemetadata/template b/srcpkgs/kf6-kfilemetadata/template index 814709ba7c10b3..2b8e6fc60c4af4 100644 --- a/srcpkgs/kf6-kfilemetadata/template +++ b/srcpkgs/kf6-kfilemetadata/template @@ -2,14 +2,14 @@ # group=kde-frameworks pkgname=kf6-kfilemetadata version=6.29.0 -revision=1 +revision=2 build_style=cmake configure_args="-DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins" hostmakedepends="extra-cmake-modules qt6-tools qt6-base gettext pkg-config kf6-kconfig" makedepends="qt6-base-devel kf6-kcodecs-devel kf6-ki18n-devel kf6-karchive-devel kf6-kcoreaddons-devel kf6-kconfig-devel attr-devel taglib-devel libqmobipocket6-devel - exiv2-devel ffmpeg6-devel ebook-tools-devel poppler-qt6-devel" + exiv2-devel ffmpeg-devel ebook-tools-devel poppler-qt6-devel" short_desc="Library for extracting file metadata" maintainer="John " license="LGPL-2.1-or-later" From 2541a3ef2b6e807573b209e829a9bcb1a7b1e4bc Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 031/115] kodi: revbump for ffmpeg9 --- .../kodi/patches/cross-internal-ffmpeg.patch | 15 +++++++++ srcpkgs/kodi/template | 33 +++++++++++++------ 2 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 srcpkgs/kodi/patches/cross-internal-ffmpeg.patch diff --git a/srcpkgs/kodi/patches/cross-internal-ffmpeg.patch b/srcpkgs/kodi/patches/cross-internal-ffmpeg.patch new file mode 100644 index 00000000000000..28094b5d96b761 --- /dev/null +++ b/srcpkgs/kodi/patches/cross-internal-ffmpeg.patch @@ -0,0 +1,15 @@ +--- a/tools/depends/target/ffmpeg/CMakeLists.txt ++++ b/tools/depends/target/ffmpeg/CMakeLists.txt +@@ -12,10 +12,11 @@ + ) + endif() + +-if(CROSSCOMPILING) ++if(CMAKE_CROSSCOMPILING) + set(pkgconf "PKG_CONFIG_LIBDIR=${DEPENDS_PATH}/lib/pkgconfig") + list(APPEND ffmpeg_conf --pkg-config=${PKG_CONFIG_EXECUTABLE} + --pkg-config-flags=--static ++ --pkg-config-flags=--libs-only-l + --enable-cross-compile + --enable-pic + --ar=${CMAKE_AR} diff --git a/srcpkgs/kodi/template b/srcpkgs/kodi/template index 422ba2bc5b8230..37e01b08f2247c 100644 --- a/srcpkgs/kodi/template +++ b/srcpkgs/kodi/template @@ -1,31 +1,33 @@ # Template file for 'kodi' pkgname=kodi version=21.2 -revision=5 +revision=6 _codename="Omega" _crossguid_ver="ca1bf4b810e2d188d04cb6286f957008ee1b7681" _dvdcss_ver="1.4.3-Next-Nexus-Alpha2-2" _dvdread_ver="6.1.3-Next-Nexus-Alpha2-2" _dvdnav_ver="6.1.1-Next-Nexus-Alpha2-2" _udfread_ver="1.1.2" +_ffmpeg_ver="6.0.1" _groovy=4.0.16 _common_lang=3.14.0 _common_text=1.11.0 build_style=cmake # XXX: some vendored libraries aren't found if CMAKE_BUILD_TYPE=None # because there is special handling for =Release -configure_args="-DWITH_FFMPEG=/usr -DENABLE_LDGOLD=OFF -DAPP_RENDER_SYSTEM=gl -DCMAKE_BUILD_TYPE=Release +configure_args="-DENABLE_LDGOLD=OFF -DAPP_RENDER_SYSTEM=gl -DCMAKE_BUILD_TYPE=Release -DENABLE_LDGOLD=OFF -DENABLE_AIRTUNES=ON -DENABLE_AVAHI=ON -DENABLE_BLURAY=ON -DENABLE_CEC=ON -DENABLE_DBUS=ON -DENABLE_DVDCSS=ON -DENABLE_EGL=ON -DENABLE_EVENTCLIENTS=ON -DENABLE_MICROHTTPD=ON -DENABLE_MYSQLCLIENT=ON -DENABLE_NFS=ON -DENABLE_OPTICAL=ON -DENABLE_SMBCLIENT=ON -DENABLE_UDEV=ON -DENABLE_UPNP=ON -DENABLE_VAAPI=ON -DENABLE_VDPAU=ON -DENABLE_XSLT=ON -DENABLE_LIRCCLIENT=OFF -DENABLE_INTERNAL_RapidJSON=OFF -DENABLE_INTERNAL_CROSSGUID=ON -DENABLE_INTERNAL_FSTRCMP=OFF - -DENABLE_INTERNAL_FLATBUFFERS=OFF -DENABLE_INTERNAL_UDFREAD=ON + -DENABLE_INTERNAL_FLATBUFFERS=OFF -DENABLE_INTERNAL_UDFREAD=ON -DENABLE_INTERNAL_FFMPEG=ON -DCROSSGUID_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/crossguid-${_crossguid_ver}.tar.gz -Dlibdvdcss_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/libdvdcss-${_dvdcss_ver}.tar.gz -Dlibdvdnav_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/libdvdnav-${_dvdnav_ver}.tar.gz -Dlibdvdread_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/libdvdread-${_dvdread_ver}.tar.gz - -DUDFREAD_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/libudfread-${_udfread_ver}.tar.gz" + -DUDFREAD_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/libudfread-${_udfread_ver}.tar.gz + -DFFMPEG_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/ffmpeg-${_ffmpeg_ver}.tar.gz" make_build_target="all" hostmakedepends="automake libtool pkg-config gperf gettext zip nasm yasm python3-devel python3-packaging-bootstrap @@ -40,7 +42,7 @@ makedepends="eudev-libudev-devel pcre-devel expat-devel libpng-devel libjpeg-tur enca-devel boost-headers libcurl-devel libva-devel libvdpau-devel libass-devel libbluetooth-devel yajl-devel libplist-devel librtmp-devel libdisplay-info-devel tinyxml-devel tinyxml2-devel taglib-devel libcap-devel lame-devel libbluray-devel - libnfs-devel ffmpeg6-devel giflib-devel libxslt-devel gnutls-devel libssh-devel + libnfs-devel giflib-devel libxslt-devel gnutls-devel libssh-devel libmicrohttpd-devel libcec-devel dcadec-devel flatbuffers-devel fmt-devel lcms2-devel libfstrcmp-devel rapidjson libcdio-paranoia spdlog libwaylandpp-devel libinput-devel libdav1d-devel gtest-devel python3-devel" @@ -58,9 +60,10 @@ distfiles="https://github.com/xbmc/xbmc/archive/${version}-${_codename}.tar.gz https://github.com/xbmc/libdvdread/archive/${_dvdread_ver}.tar.gz>libdvdread-${_dvdread_ver}.tar.gz https://github.com/xbmc/libdvdnav/archive/${_dvdnav_ver}.tar.gz>libdvdnav-${_dvdnav_ver}.tar.gz https://mirrors.kodi.tv/build-deps/sources/libudfread-${_udfread_ver}.tar.gz - http://mirrors.kodi.tv/build-deps/sources/commons-lang3-${_common_lang}-bin.tar.gz - http://mirrors.kodi.tv/build-deps/sources/commons-text-${_common_text}-bin.tar.gz - http://mirrors.kodi.tv/build-deps/sources/apache-groovy-binary-${_groovy}.zip" + https://mirrors.kodi.tv/build-deps/sources/commons-lang3-${_common_lang}-bin.tar.gz + https://mirrors.kodi.tv/build-deps/sources/commons-text-${_common_text}-bin.tar.gz + https://mirrors.kodi.tv/build-deps/sources/apache-groovy-binary-${_groovy}.zip + https://mirrors.kodi.tv/build-deps/sources/ffmpeg-${_ffmpeg_ver}.tar.gz" checksum="da3a5df663684664b9383b65f1c06568222629d935084a59e4e641fcdcb6c383 6be27e0b3a4907f0cd3cfadec255ee1b925569e1bd06e67a4d2f4267299b69c4 f38c4a4e7a4f4da6d8e83b8852489aa3bb6588a915dc41f5ee89d9aad305a06e @@ -69,7 +72,8 @@ checksum="da3a5df663684664b9383b65f1c06568222629d935084a59e4e641fcdcb6c383 2bf16726ac98d093156195bb049a663e07d3323e079c26912546f4e05c77bac5 317c3e3fcd5fcca3781a7996ff1e0c50c13244ee961e94e5f6f6d84b84733b16 4169cb90571fb28fad4c5eea7c1c994c18f1995452f73e8ea7a86087c0e3822e - b8c3bec88a3f5a62235d9429a97e371032bf7216f3e28724823a9169dd10befc" + b8c3bec88a3f5a62235d9429a97e371032bf7216f3e28724823a9169dd10befc + 375fd8abab657d18578554927d23abfc9cb3b6794bd9839330230cf5f9fcea26" skip_extraction="crossguid-${_crossguid_ver}.tar.gz libdvdcss-${_dvdcss_ver}.tar.gz libdvdread-${_dvdread_ver}.tar.gz @@ -77,7 +81,8 @@ skip_extraction="crossguid-${_crossguid_ver}.tar.gz libudfread-${_udfread_ver}.tar.gz commons-lang3-${_common_lang}-bin.tar.gz commons-text-${_common_text}-bin.tar.gz - apache-groovy-binary-${_groovy}.zip" + apache-groovy-binary-${_groovy}.zip + ffmpeg-${_ffmpeg_ver}.tar.gz" lib32disabled=yes python_version=3 LDFLAGS="-Wl,-z,stack-size=1048576" @@ -120,6 +125,7 @@ fi pre_configure() { if [ "$CROSS_BUILD" ]; then +# vsed -i "2i include(/builddir/kodi-21.2/build/cross_${XBPS_CROSS_TRIPLET}.cmake)" CMakeLists.txt find -type f | \ grep "configure\.ac\|Makefile\|cmake\|config\.site" | \ xargs sed -i -e "s;-isystem;-I;g" @@ -160,6 +166,13 @@ pre_configure() { configure_args+=" -Dapache-commons-text_SOURCE_DIR=$wrksrc/xbps/common-text" } +# static internal ffmpeg is put in cmake build/build/lib dir +post_configure() { + if [ "$CROSS_BUILD" ]; then + vsed -i "s|lib -Wl,--export-dyn|lib -L/builddir/kodi-${version}/build/build/lib -Wl,--export-dyn|" build/build.ninja + fi +} + do_check() { ./build/kodi-test --gtest_filter="${_gtest_filter}" } From 53bba7c90ad51dc644bee712df8046ab6972c5b6 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 032/115] kpipewire: revbump for ffmpeg9 --- srcpkgs/kpipewire/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/kpipewire/template b/srcpkgs/kpipewire/template index 7bb74a7edd62e8..2eddeb27d55935 100644 --- a/srcpkgs/kpipewire/template +++ b/srcpkgs/kpipewire/template @@ -2,12 +2,12 @@ # group=kde-plasma pkgname=kpipewire version=6.7.5 -revision=1 +revision=2 build_style=cmake configure_args="-DKDE_INSTALL_QMLDIR=lib/qt6/qml" hostmakedepends="extra-cmake-modules gettext qt6-base qt6-tools pkg-config pipewire wayland-devel qt6-declarative-host-tools" -makedepends="ffmpeg6-devel kf6-kcoreaddons-devel kf6-kwayland-devel +makedepends="ffmpeg-devel kf6-kcoreaddons-devel kf6-kwayland-devel kf6-ki18n-devel libva-devel libepoxy-devel pipewire-devel plasma-wayland-protocols wayland-devel qt6-declarative-devel qt6-base-private-devel" From 08b2f2c4d1c107a9136a083e83195ff797802194 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 033/115] lms: revbump for ffmpeg9 --- srcpkgs/lms/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/lms/template b/srcpkgs/lms/template index c6bb0aca1e53cb..8b694b38b3d913 100644 --- a/srcpkgs/lms/template +++ b/srcpkgs/lms/template @@ -1,11 +1,11 @@ # Template file for 'lms' pkgname=lms version=3.76.0 -revision=3 +revision=4 build_style=cmake configure_args="-DLMS_IMAGE_BACKEND=graphicsmagick" hostmakedepends="pkg-config" -makedepends="wt-devel ffmpeg6-devel boost-devel-minimal +makedepends="wt-devel ffmpeg-devel boost-devel-minimal libconfig++-devel taglib-devel pugixml-devel pam-devel libgraphicsmagick-devel gtest-devel libarchive-devel xxHash-devel" conf_files="/etc/lms.conf /etc/pam.d/lms" From ace523d89ad5ecca32b05a2773a82754ed522a48 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 034/115] localsearch: revbump for ffmpeg9 --- srcpkgs/localsearch/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/localsearch/template b/srcpkgs/localsearch/template index 7e2db1cb0f6a9d..7a958cc538ccf6 100644 --- a/srcpkgs/localsearch/template +++ b/srcpkgs/localsearch/template @@ -1,7 +1,7 @@ # Template file for 'localsearch' pkgname=localsearch version=3.11.0 -revision=1 +revision=2 build_style=meson build_helper=qemu configure_args="-Dextract=true -Dcue=enabled -Dexif=enabled -Dlibav=enabled @@ -12,7 +12,7 @@ configure_args="-Dextract=true -Dcue=enabled -Dexif=enabled -Dlibav=enabled -Dsystemd_user_services=false $(vopt_feature landlock)" hostmakedepends="pkg-config glib-devel gettext asciidoc python3-dbusmock" -makedepends="tinysparql-devel ffmpeg6-devel dbus-devel exempi-devel +makedepends="tinysparql-devel ffmpeg-devel dbus-devel exempi-devel libglib-devel libgexiv2-devel gstreamer1-devel icu-devel libcue-devel libexif-devel libgsf-devel libgxps-devel libiptcdata-devel libjpeg-turbo-devel libosinfo-devel libpng-devel libseccomp-devel tiff-devel libxml2-devel From cb9ff500c0d523bfe48e5cb6ada8f72bae3ce0fb Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 035/115] minidlna: revbump for ffmpeg9 --- srcpkgs/minidlna/patches/ffmpeg8.patch | 11 +++++++++++ srcpkgs/minidlna/template | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/minidlna/patches/ffmpeg8.patch diff --git a/srcpkgs/minidlna/patches/ffmpeg8.patch b/srcpkgs/minidlna/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..5cf27e08a40488 --- /dev/null +++ b/srcpkgs/minidlna/patches/ffmpeg8.patch @@ -0,0 +1,11 @@ +--- a/libav.h ++++ b/libav.h +@@ -174,7 +174,7 @@ + #define lav_codec_tag(s) s->codecpar->codec_tag + #define lav_sample_rate(s) s->codecpar->sample_rate + #define lav_bit_rate(s) s->codecpar->bit_rate +-#define lav_channels(s) s->codecpar->channels ++#define lav_channels(s) s->codecpar->ch_layout.nb_channels + #define lav_width(s) s->codecpar->width + #define lav_height(s) s->codecpar->height + #define lav_profile(s) s->codecpar->profile diff --git a/srcpkgs/minidlna/template b/srcpkgs/minidlna/template index cffc4138f2e15a..c518a5c57ec986 100644 --- a/srcpkgs/minidlna/template +++ b/srcpkgs/minidlna/template @@ -1,7 +1,7 @@ # Template file for 'minidlna' pkgname=minidlna version=1.3.3 -revision=4 +revision=5 build_style=gnu-configure configure_args=" --sbindir=/usr/bin @@ -12,7 +12,7 @@ make_dirs=" /var/lib/minidlna 0750 minidlna minidlna /var/log/minidlna 0750 minidlna minidlna" hostmakedepends="pkg-config gettext" -makedepends="ffmpeg6-devel libjpeg-turbo-devel sqlite-devel libexif-devel +makedepends="ffmpeg-devel libjpeg-turbo-devel sqlite-devel libexif-devel libid3tag-devel libvorbis-devel libflac-devel" short_desc="DLNA/UPnP-AV compliant media server" maintainer="Duncaen " From 8369dfbd76997f53e1bfedac7e71fd35496cd1c4 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 036/115] mixxx: revbump for ffmpeg9 --- srcpkgs/mixxx/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/mixxx/template b/srcpkgs/mixxx/template index 3222d4c42f369b..20ae9a2c0a992e 100644 --- a/srcpkgs/mixxx/template +++ b/srcpkgs/mixxx/template @@ -1,12 +1,12 @@ # Template file for 'mixxx' pkgname=mixxx version=2.5.6 -revision=2 +revision=3 build_style=cmake configure_args="-DCMAKE_BUILD_TYPE=Release -DENGINEPRIME=OFF" hostmakedepends="extra-cmake-modules pkg-config protobuf qt6-tools qt6-base qt6-declarative-host-tools qt6-shadertools mold" -makedepends="benchmark-devel chromaprint-devel faad2-devel ffmpeg6-devel +makedepends="benchmark-devel chromaprint-devel faad2-devel ffmpeg-devel glib-devel glu-devel gperftools-devel gtest-devel lame-devel libid3tag-devel libsndfile-devel libmad-devel libmodplug-devel libusb-devel opusfile-devel libflac-devel libogg-devel libvorbis-devel lilv-devel lv2 libmp4v2-devel From 416daf9d453b7290ccee1975dedd436ccb9f8d78 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 037/115] motion: revbump for ffmpeg9 --- srcpkgs/motion/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/motion/template b/srcpkgs/motion/template index 911ff7eba76c6e..64ce3640750523 100644 --- a/srcpkgs/motion/template +++ b/srcpkgs/motion/template @@ -1,10 +1,10 @@ # Template file for 'motion' pkgname=motion version=4.7.1 -revision=1 +revision=2 build_style=gnu-configure hostmakedepends="automake pkg-config gettext-devel tar" -makedepends="ffmpeg6-devel libmicrohttpd-devel v4l-utils-devel gettext-devel" +makedepends="ffmpeg-devel libmicrohttpd-devel v4l-utils-devel gettext-devel" short_desc="Software motion detector" maintainer="Orphaned " license="GPL-2.0-or-later" From 5c476682c5acac4baa0b041e9cfba895a52661b1 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 038/115] mpd: revbump for ffmpeg9 --- srcpkgs/mpd/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/mpd/template b/srcpkgs/mpd/template index f9e6f9d0d29def..632a327058357f 100644 --- a/srcpkgs/mpd/template +++ b/srcpkgs/mpd/template @@ -1,7 +1,7 @@ # Template file for 'mpd' pkgname=mpd version=0.24.13 -revision=1 +revision=2 build_style=meson configure_args="-Dopus=enabled -Dmikmod=enabled -Dneighbor=true -Dpipe=true -Dtwolame=enabled -Dbzip2=enabled @@ -18,7 +18,7 @@ configure_args="-Dopus=enabled -Dmikmod=enabled -Dneighbor=true $(vopt_feature openmpt openmpt) $(vopt_feature pipewire pipewire)" conf_files="/etc/mpd.conf" hostmakedepends="pkg-config python3-Sphinx" -makedepends="avahi-glib-libs-devel faad2-devel ffmpeg6-devel +makedepends="avahi-glib-libs-devel faad2-devel ffmpeg-devel libcurl-devel libid3tag-devel libmad-devel libmikmod-devel libmms-devel libmodplug-devel libmpdclient-devel libnfs-devel libsamplerate-devel libnpupnp-devel mpg123-devel opus-devel pcre2-devel icu-devel From aee31d7a6bcc0de2fd4ee62d80820413cbece9a8 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 039/115] musikcube: revbump for ffmpeg9 --- srcpkgs/musikcube/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/musikcube/template b/srcpkgs/musikcube/template index aadaae413e7656..1a4288c9627a90 100644 --- a/srcpkgs/musikcube/template +++ b/srcpkgs/musikcube/template @@ -1,12 +1,12 @@ # Template file for 'musikcube' pkgname=musikcube version=3.0.5 -revision=1 +revision=2 build_style=cmake make_cmd=make configure_args="-DNO_NCURSESW=1" hostmakedepends="pkg-config" -makedepends="libgme-devel libogg-devel libmicrohttpd-devel ffmpeg6-devel +makedepends="libgme-devel libogg-devel libmicrohttpd-devel ffmpeg-devel openssl-devel pulseaudio-devel lame-devel zlib-devel alsa-lib-devel libvorbis-devel libcurl-devel ncurses-devel libev-devel taglib-devel sndio-devel pipewire-devel ncurses-libtinfo-devel libopenmpt-devel From 4e3f3ac64d41280929a4282079aa5c81a3b9f662 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 040/115] openmw: revbump for ffmpeg9 --- srcpkgs/openmw/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/openmw/template b/srcpkgs/openmw/template index a1eba62c3a74c7..3bef5f6d468f39 100644 --- a/srcpkgs/openmw/template +++ b/srcpkgs/openmw/template @@ -1,7 +1,7 @@ # Template file for 'openmw' pkgname=openmw version=0.51.0 -revision=1 +revision=2 build_style=cmake _recast_commit=c393777d26d2ff6519ac23612abf8af42678c9dd _bullet_tag=3.25 @@ -11,7 +11,7 @@ configure_args="-DOPENMW_USE_SYSTEM_BULLET=OFF -DOPENMW_USE_SYSTEM_MYGUI=ON -DOPENMW_LTO_BUILD=ON -DFETCHCONTENT_FULLY_DISCONNECTED=On" hostmakedepends="pkg-config qt6-base qt6-tools" makedepends="SDL2-devel boost-devel-minimal libboost_filesystem - libboost_iostreams libboost_program_options ffmpeg6-devel libXt-devel + libboost_iostreams libboost_program_options ffmpeg-devel libXt-devel libmygui-devel libopenal-devel libunshield-devel osg-devel qt6-svg-devel liblz4-devel yaml-cpp-devel LuaJIT-devel" short_desc="Open Implementation of Morrowind's Engine" From d0b3e3090c4800ab2cc3733da57108bf4b6a61a4 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 041/115] pianobar: revbump for ffmpeg9 --- srcpkgs/pianobar/patches/ffmpeg8.patch | 38 ++++++++++++++++++++++++++ srcpkgs/pianobar/template | 4 +-- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/pianobar/patches/ffmpeg8.patch diff --git a/srcpkgs/pianobar/patches/ffmpeg8.patch b/srcpkgs/pianobar/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..0e1fd066f253fb --- /dev/null +++ b/srcpkgs/pianobar/patches/ffmpeg8.patch @@ -0,0 +1,38 @@ +--- a/src/player.c ++++ b/src/player.c +@@ -286,7 +286,7 @@ + "time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=0x%"PRIx64, + time_base.num, time_base.den, cp->sample_rate, + av_get_sample_fmt_name (player->cctx->sample_fmt), +- cp->channel_layout); ++ cp->ch_layout); + if ((ret = avfilter_graph_create_filter (&player->fabuf, + avfilter_get_by_name ("abuffer"), "source", strbuf, NULL, + player->fgraph)) < 0) { +@@ -340,7 +340,7 @@ + memset (&aoFmt, 0, sizeof (aoFmt)); + aoFmt.bits = av_get_bytes_per_sample (avformat) * 8; + assert (aoFmt.bits > 0); +- aoFmt.channels = cp->channels; ++ aoFmt.channels = cp->ch_layout.nb_channels; + aoFmt.rate = getSampleRate (player); + aoFmt.byte_format = AO_FMT_NATIVE; + +@@ -508,7 +508,6 @@ + player->fgraph = NULL; + } + if (player->cctx != NULL) { +- avcodec_close (player->cctx); + player->cctx = NULL; + } + if (player->fctx != NULL) { +@@ -583,8 +582,7 @@ + } + pthread_mutex_unlock (&player->aoplayLock); + +- const int numChannels = av_get_channel_layout_nb_channels ( +- filteredFrame->channel_layout); ++ const int numChannels = filteredFrame->ch_layout.nb_channels; + const int bps = av_get_bytes_per_sample (filteredFrame->format); + ao_play (player->aoDev, (char *) filteredFrame->data[0], + filteredFrame->nb_samples * numChannels * bps); diff --git a/srcpkgs/pianobar/template b/srcpkgs/pianobar/template index 25ef1ab4c34af6..142d299f460707 100644 --- a/srcpkgs/pianobar/template +++ b/srcpkgs/pianobar/template @@ -1,11 +1,11 @@ # Template file for 'pianobar' pkgname=pianobar version=2022.04.01 -revision=2 +revision=3 build_style=gnu-makefile make_build_args="V=1" hostmakedepends="pkg-config" -makedepends="faad2-devel ffmpeg6-devel gnutls-devel json-c-devel libao-devel +makedepends="faad2-devel ffmpeg-devel gnutls-devel json-c-devel libao-devel libcurl-devel libgcrypt-devel" short_desc="Free/open-source, console-based client for Pandora radio" maintainer="Orphaned " From eee3ebba2b76d490fbf10f9706205507b8df63a9 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 042/115] pqiv: revbump for ffmpeg9 --- srcpkgs/pqiv/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/pqiv/template b/srcpkgs/pqiv/template index f7cc21aa23718d..1ed231874b28b7 100644 --- a/srcpkgs/pqiv/template +++ b/srcpkgs/pqiv/template @@ -1,10 +1,10 @@ # Template file for 'pqiv' pkgname=pqiv version=2.13.3 -revision=1 +revision=2 build_style=gnu-makefile hostmakedepends="pkg-config" -makedepends="glib-devel gtk+3-devel $(vopt_if ffmpeg ffmpeg6-devel) +makedepends="glib-devel gtk+3-devel $(vopt_if ffmpeg ffmpeg-devel) $(vopt_if archive libarchive-devel) $(vopt_if ps libspectre-devel) $(vopt_if webp libwebp-devel) $(vopt_if pdf poppler-glib-devel)" short_desc="Powerful quick image viewer" From 62f1e09e6cb0a7df424438e601acc4906d139729 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 043/115] qmmp: revbump for ffmpeg9 --- srcpkgs/qmmp/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/qmmp/template b/srcpkgs/qmmp/template index b88f03c0af6c67..784dadff089ee8 100644 --- a/srcpkgs/qmmp/template +++ b/srcpkgs/qmmp/template @@ -1,11 +1,11 @@ # Template file for 'qmmp' pkgname=qmmp version=2.3.2 -revision=1 +revision=2 build_style=cmake configure_args="-DUSE_HAL:BOOL=FALSE -DQMMP_DEFAULT_UI:STRING=simple" hostmakedepends="pkg-config qt6-base qt6-tools" -makedepends="enca-devel faad2-devel ffmpeg6-devel jack-devel libarchive-devel +makedepends="enca-devel faad2-devel ffmpeg-devel jack-devel libarchive-devel libbs2b-devel libcdio-paranoia-devel libcurl-devel libgme-devel libmad-devel libmms-devel libmodplug-devel libmpcdec-devel libsamplerate-devel libshout-devel libsidplayfp-devel libsoxr-devel libwildmidi-devel opusfile-devel pipewire-devel From c3b2bf2f0bc1603767c73cd4cc847d544b80392f Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 044/115] qtox: revbump for ffmpeg9 --- srcpkgs/qtox/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/qtox/template b/srcpkgs/qtox/template index 13841fc1a3cb55..dfc34e70866609 100644 --- a/srcpkgs/qtox/template +++ b/srcpkgs/qtox/template @@ -1,12 +1,12 @@ # Template file for 'qtox' pkgname=qtox version=1.18.5 -revision=1 +revision=2 build_style=cmake configure_args="-DUPDATE_CHECK=OFF -DGIT_VERSION=${version} -DGIT_DESCRIBE_EXACT=${version} -DGIT_DESCRIBE=${version}" hostmakedepends="pkg-config qt6-base qt6-tools" -makedepends="ffmpeg6-devel libexif-devel libopenal-devel libsodium-devel +makedepends="ffmpeg-devel libexif-devel libopenal-devel libsodium-devel libvpx-devel opus-devel qrencode-devel libtomcrypt-devel qt6-base-devel qt6-tools-devel qt6-svg-devel kf6-sonnet-devel sqlcipher-devel toxcore-devel v4l-utils-devel libXScrnSaver-devel" From 9316cd863929342f5ff618ff63ec5c63496e0322 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 045/115] retroarch: revbump for ffmpeg9 --- srcpkgs/retroarch/patches/ffmpeg9.patch | 75 +++++++++++++++++++++++++ srcpkgs/retroarch/template | 4 +- 2 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/retroarch/patches/ffmpeg9.patch diff --git a/srcpkgs/retroarch/patches/ffmpeg9.patch b/srcpkgs/retroarch/patches/ffmpeg9.patch new file mode 100644 index 00000000000000..8b9b3905d43266 --- /dev/null +++ b/srcpkgs/retroarch/patches/ffmpeg9.patch @@ -0,0 +1,75 @@ +# https://gitlab.archlinux.org/archlinux/packaging/packages/retroarch/-/blob/main/ffmpeg-9.patch?ref_type=heads +diff --git a/record/drivers/record_ffmpeg.c b/record/drivers/record_ffmpeg.c +index cfe0b6acd0..b2a9e2038a 100644 +--- a/record/drivers/record_ffmpeg.c ++++ b/record/drivers/record_ffmpeg.c +@@ -226,28 +226,30 @@ static void ffmpeg_audio_resolve_format(struct ff_audio_info *audio, + { + audio->codec->sample_fmt = AV_SAMPLE_FMT_NONE; + +- if (ffmpeg_codec_has_sample_format(AV_SAMPLE_FMT_FLTP, codec->sample_fmts)) ++ const enum AVSampleFormat *codec_sample_fmts = NULL; ++ avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0, (const void**)&codec_sample_fmts, NULL); ++ if (ffmpeg_codec_has_sample_format(AV_SAMPLE_FMT_FLTP, codec_sample_fmts)) + { + audio->codec->sample_fmt = AV_SAMPLE_FMT_FLTP; + audio->use_float = true; + audio->is_planar = true; + RARCH_LOG("[FFmpeg] Using sample format FLTP.\n"); + } +- else if (ffmpeg_codec_has_sample_format(AV_SAMPLE_FMT_FLT, codec->sample_fmts)) ++ else if (ffmpeg_codec_has_sample_format(AV_SAMPLE_FMT_FLT, codec_sample_fmts)) + { + audio->codec->sample_fmt = AV_SAMPLE_FMT_FLT; + audio->use_float = true; + audio->is_planar = false; + RARCH_LOG("[FFmpeg] Using sample format FLT.\n"); + } +- else if (ffmpeg_codec_has_sample_format(AV_SAMPLE_FMT_S16P, codec->sample_fmts)) ++ else if (ffmpeg_codec_has_sample_format(AV_SAMPLE_FMT_S16P, codec_sample_fmts)) + { + audio->codec->sample_fmt = AV_SAMPLE_FMT_S16P; + audio->use_float = false; + audio->is_planar = true; + RARCH_LOG("[FFmpeg] Using sample format S16P.\n"); + } +- else if (ffmpeg_codec_has_sample_format(AV_SAMPLE_FMT_S16, codec->sample_fmts)) ++ else if (ffmpeg_codec_has_sample_format(AV_SAMPLE_FMT_S16, codec_sample_fmts)) + { + audio->codec->sample_fmt = AV_SAMPLE_FMT_S16; + audio->use_float = false; +@@ -264,19 +266,21 @@ static void ffmpeg_audio_resolve_sample_rate(ffmpeg_t *handle, + struct record_params *param = &handle->params; + + /* We'll have to force resampling to some supported sampling rate. */ +- if (codec->supported_samplerates && !params->sample_rate) ++ const int *codec_supported_samplerates = NULL; ++ avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_SAMPLE_RATE, 0, (const void**)&codec_supported_samplerates, NULL); ++ if (codec_supported_samplerates && !params->sample_rate) + { + unsigned i; + int input_rate = (int)param->samplerate; + + /* Favor closest sampling rate, but always prefer ratio > 1.0. */ +- int best_rate = codec->supported_samplerates[0]; ++ int best_rate = codec_supported_samplerates[0]; + int best_diff = best_rate - input_rate; + +- for (i = 1; codec->supported_samplerates[i]; i++) ++ for (i = 1; codec_supported_samplerates[i]; i++) + { + bool better_rate = false; +- int diff = codec->supported_samplerates[i] - input_rate; ++ int diff = codec_supported_samplerates[i] - input_rate; + + if (best_diff < 0) + better_rate = (diff > best_diff); +@@ -285,7 +289,7 @@ static void ffmpeg_audio_resolve_sample_rate(ffmpeg_t *handle, + + if (better_rate) + { +- best_rate = codec->supported_samplerates[i]; ++ best_rate = codec_supported_samplerates[i]; + best_diff = diff; + } + } diff --git a/srcpkgs/retroarch/template b/srcpkgs/retroarch/template index bad4965ffb82b8..eaf9153fcf645a 100644 --- a/srcpkgs/retroarch/template +++ b/srcpkgs/retroarch/template @@ -1,7 +1,7 @@ # Template file for 'retroarch' pkgname=retroarch version=1.22.2 -revision=1 +revision=2 build_style=configure configure_args="--prefix=/usr --sysconfdir=/etc --enable-networking --enable-udev --enable-systemmbedtls @@ -12,7 +12,7 @@ configure_args="--prefix=/usr --sysconfdir=/etc --enable-networking conf_files="/etc/retroarch.cfg" hostmakedepends="pkg-config" makedepends="alsa-lib-devel eudev-libudev-devel freetype-devel libusb-devel libxkbcommon-devel - mbedtls-devel zlib-devel $(vopt_if ffmpeg ffmpeg6-devel) + mbedtls-devel zlib-devel $(vopt_if ffmpeg ffmpeg-devel) $(vopt_if jack jack-devel) $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if qt5 qt5-devel) $(vopt_if sdl2 SDL2-devel) $(vopt_if vulkan vulkan-loader-devel) $(vopt_if x11 'libXext-devel libXinerama-devel libXxf86vm-devel')" From f9ef5e465a699880f2f2c079955c7f1f2cf4f3d4 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 046/115] retroshare: revbump for ffmpeg9 --- srcpkgs/retroshare/template | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/srcpkgs/retroshare/template b/srcpkgs/retroshare/template index 4b834864c4143a..eeeac550eb5caa 100644 --- a/srcpkgs/retroshare/template +++ b/srcpkgs/retroshare/template @@ -1,13 +1,13 @@ # Template file for 'retroshare' pkgname=retroshare version=0.6.6 -revision=5 +revision=6 build_style=qmake #XXX broadcast feature requires an ancient udp-discovery-cpp which either needs # to be fetched+patched (FTBFS) here or packaged :/ configure_args="RS_UPNP_LIB=miniupnpc CONFIG+=no_rs_broadcast_discovery" hostmakedepends="pkg-config qt5-qmake qt5-host-tools" -makedepends="ffmpeg6-devel libsecret-devel libmicrohttpd-devel +makedepends="ffmpeg-devel libsecret-devel libmicrohttpd-devel libopencv-devel libssh-devel miniupnpc-devel libXScrnSaver-devel libxslt-devel pulseaudio-devel qt5-multimedia-devel qt5-tools-devel qt5-x11extras-devel speex-devel sqlcipher-devel sqlite-devel rapidjson" @@ -20,6 +20,10 @@ checksum=c545b9249ac7dbfef72a2d636bc0f8b729c7ce05f21a54dd9284b2a387592d4a export CXXFLAGS="-std=c++14" +if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + CXXFLAGS+=" -D_LARGEFILE64_SOURCE" +fi + post_install() { for l in COPYING LICENSES/*; do vlicense "$l" From e2f38b6157260742acd49efb3399c5e86d09f449 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 047/115] rsgain: revbump for ffmpeg9 --- srcpkgs/rsgain/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/rsgain/template b/srcpkgs/rsgain/template index e78dab9bb79ca6..ac3251dec61f30 100644 --- a/srcpkgs/rsgain/template +++ b/srcpkgs/rsgain/template @@ -1,10 +1,10 @@ # Template file for 'rsgain' pkgname=rsgain version=3.7 -revision=1 +revision=2 build_style=cmake hostmakedepends="pkg-config" -makedepends="ffmpeg6-devel taglib-devel libebur128-devel inih-devel fmt-devel" +makedepends="ffmpeg-devel taglib-devel libebur128-devel inih-devel fmt-devel" short_desc="Simple, but powerful ReplayGain 2.0 tagging utility" maintainer="lemmi " license="BSD-2-Clause" From 24d38561dce9f7a55f03fd601fe0f9b86ee4930b Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 048/115] scrcpy: revbump for ffmpeg9 --- srcpkgs/scrcpy/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/scrcpy/template b/srcpkgs/scrcpy/template index 2922147e5d6491..3506fe5121654f 100644 --- a/srcpkgs/scrcpy/template +++ b/srcpkgs/scrcpy/template @@ -1,12 +1,12 @@ # Template file for 'scrcpy' pkgname=scrcpy version=4.1 -revision=1 +revision=2 build_style=meson configure_args="-Dcompile_server=false -Dprebuilt_server=/usr/share/scrcpy/scrcpy-server-v${version}" hostmakedepends="pkg-config" -makedepends="SDL3-devel ffmpeg6-devel" +makedepends="SDL3-devel ffmpeg-devel" depends="android-tools" short_desc="Display and control your Android device" maintainer="Orphaned " From 7e4d59b3ceb8edc56d88262d4a5d391efe51c33b Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 049/115] siril: revbump for ffmpeg9 --- srcpkgs/siril/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/siril/template b/srcpkgs/siril/template index 2d84517e1e6649..c16864d54cce88 100644 --- a/srcpkgs/siril/template +++ b/srcpkgs/siril/template @@ -1,13 +1,13 @@ # Template file for 'siril' pkgname=siril version=1.4.4 -revision=1 +revision=2 build_style=meson meson_builddir=mbuild hostmakedepends="pkg-config cmake-bootstrap glib-devel" makedepends="fftw-devel libconfig-devel libopencv-devel libffms2-devel gsl-devel libraw-devel tiff-devel libpng-devel libcurl-devel exiv2-devel - ffmpeg6-devel gtk+3-devel cfitsio-devel gsl-devel libgomp-devel libheif-devel + ffmpeg-devel gtk+3-devel cfitsio-devel gsl-devel libgomp-devel libheif-devel libjxl-devel libxisf-devel gtksourceview4-devel libgit2-1.9-devel yyjson-devel wcslib-devel" depends="gnuplot" short_desc="Free astronomical image processing software" From a8afc1ca0f980c13d4a77e6bc00b577010ce2c04 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 050/115] spek-x: update to 0.9.4 --- srcpkgs/spek-x/patches/musl.patch | 7 ------- srcpkgs/spek-x/template | 10 +++++----- 2 files changed, 5 insertions(+), 12 deletions(-) delete mode 100644 srcpkgs/spek-x/patches/musl.patch diff --git a/srcpkgs/spek-x/patches/musl.patch b/srcpkgs/spek-x/patches/musl.patch deleted file mode 100644 index 662f45936febc6..00000000000000 --- a/srcpkgs/spek-x/patches/musl.patch +++ /dev/null @@ -1,7 +0,0 @@ ---- a/tests/perf.cc 2024-03-09 17:13:49.086603418 -0500 -+++ b/tests/perf.cc 2024-03-09 17:13:59.453603753 -0500 -@@ -1,3 +1,4 @@ -+#include - #include - #include - #include diff --git a/srcpkgs/spek-x/template b/srcpkgs/spek-x/template index ecd8564fec4df3..96af0582ac3458 100644 --- a/srcpkgs/spek-x/template +++ b/srcpkgs/spek-x/template @@ -1,18 +1,18 @@ # Template file for 'spek-x' pkgname=spek-x -version=0.9.3 -revision=2 +version=0.9.4 +revision=1 build_style=gnu-configure hostmakedepends="automake gettext-devel intltool libtool pkg-config wxWidgets-common wxWidgets-gtk3-devel" -makedepends="ffmpeg6-devel wxWidgets-gtk3-devel" -depends="ffmpeg6" +makedepends="ffmpeg-devel wxWidgets-gtk3-devel" +depends="ffmpeg" short_desc="Acoustic spectrum analyser" maintainer="zlice " license="GPL-3.0-or-later" homepage="https://github.com/MikeWang000000/spek-x" distfiles="https://github.com/MikeWang000000/spek-x/archive/v${version}.tar.gz" -checksum="7f4b109903333cdd310ab2b9176f0dc49a565891376e281a233d342cedf90ef7" +checksum=95aa26969d731b8cf46c3ee010f153e9f3a1d40b092c8eba0ace82f5d0577674 CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" From 73072f6d0e2606ece930737a4566006594407c5c Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 051/115] ssr: revbump for ffmpeg9 no version release for a while. latest git works with ffmpeg8. --- .../0001-Fix-build-with-ffmpeg-5.0.patch | 241 ------------------ srcpkgs/ssr/template | 13 +- 2 files changed, 7 insertions(+), 247 deletions(-) delete mode 100644 srcpkgs/ssr/patches/0001-Fix-build-with-ffmpeg-5.0.patch diff --git a/srcpkgs/ssr/patches/0001-Fix-build-with-ffmpeg-5.0.patch b/srcpkgs/ssr/patches/0001-Fix-build-with-ffmpeg-5.0.patch deleted file mode 100644 index 4c069b5a9fc464..00000000000000 --- a/srcpkgs/ssr/patches/0001-Fix-build-with-ffmpeg-5.0.patch +++ /dev/null @@ -1,241 +0,0 @@ -From f4cbde38021d9330dc73d2e3dfa8a70da3ff5721 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= -Date: Sun, 16 Jan 2022 02:40:04 +0100 -Subject: [PATCH] Fix build with ffmpeg 5.0 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Adapt to ffmpeg 5.0 requiring more const-ness for AVCodec. - -Signed-off-by: Bernhard Rosenkränzer ---- - src/AV/Output/AudioEncoder.cpp | 6 +++--- - src/AV/Output/AudioEncoder.h | 4 ++-- - src/AV/Output/BaseEncoder.cpp | 4 ++-- - src/AV/Output/BaseEncoder.h | 4 ++-- - src/AV/Output/Muxer.cpp | 12 ++++++------ - src/AV/Output/Muxer.h | 4 ++-- - src/AV/Output/VideoEncoder.cpp | 6 +++--- - src/AV/Output/VideoEncoder.h | 4 ++-- - 8 files changed, 22 insertions(+), 22 deletions(-) - -diff --git a/src/AV/Output/AudioEncoder.cpp b/src/AV/Output/AudioEncoder.cpp -index 34d015c..cefc2e0 100644 ---- a/src/AV/Output/AudioEncoder.cpp -+++ b/src/AV/Output/AudioEncoder.cpp -@@ -34,7 +34,7 @@ const std::vector AudioEncoder::SUPPORTED_SAMPLE - - const unsigned int AudioEncoder::DEFAULT_FRAME_SAMPLES = 1024; - --AudioEncoder::AudioEncoder(Muxer* muxer, AVStream* stream, AVCodecContext *codec_context, AVCodec* codec, AVDictionary** options) -+AudioEncoder::AudioEncoder(Muxer* muxer, AVStream* stream, AVCodecContext *codec_context, const AVCodec* codec, AVDictionary** options) - : BaseEncoder(muxer, stream, codec_context, codec, options) { - - #if !SSR_USE_AVCODEC_ENCODE_AUDIO2 -@@ -77,7 +77,7 @@ unsigned int AudioEncoder::GetSampleRate() { - } - - bool AudioEncoder::AVCodecIsSupported(const QString& codec_name) { -- AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData()); -+ const AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData()); - if(codec == NULL) - return false; - if(!av_codec_is_encoder(codec)) -@@ -93,7 +93,7 @@ bool AudioEncoder::AVCodecIsSupported(const QString& codec_name) { - return false; - } - --void AudioEncoder::PrepareStream(AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options, const std::vector >& codec_options, -+void AudioEncoder::PrepareStream(AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options, const std::vector >& codec_options, - unsigned int bit_rate, unsigned int channels, unsigned int sample_rate) { - - if(channels == 0) { -diff --git a/src/AV/Output/AudioEncoder.h b/src/AV/Output/AudioEncoder.h -index c93278c..ae9c82e 100644 ---- a/src/AV/Output/AudioEncoder.h -+++ b/src/AV/Output/AudioEncoder.h -@@ -40,7 +40,7 @@ private: - #endif - - public: -- AudioEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options); -+ AudioEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options); - ~AudioEncoder(); - - // Returns the required frame size, i.e. the number of samples (for each channel). -@@ -57,7 +57,7 @@ public: - - public: - static bool AVCodecIsSupported(const QString& codec_name); -- static void PrepareStream(AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options, const std::vector >& codec_options, -+ static void PrepareStream(AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options, const std::vector >& codec_options, - unsigned int bit_rate, unsigned int channels, unsigned int sample_rate); - - private: -diff --git a/src/AV/Output/BaseEncoder.cpp b/src/AV/Output/BaseEncoder.cpp -index 7c01ef3..4780aaf 100644 ---- a/src/AV/Output/BaseEncoder.cpp -+++ b/src/AV/Output/BaseEncoder.cpp -@@ -42,7 +42,7 @@ double ParseCodecOptionDouble(const QString& key, const QString& value, double m - return clamp(value_double, min, max) * multiply; - } - --BaseEncoder::BaseEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options) { -+BaseEncoder::BaseEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options) { - - m_muxer = muxer; - m_stream = stream; -@@ -157,7 +157,7 @@ void BaseEncoder::IncrementPacketCounter() { - ++lock->m_total_packets; - } - --void BaseEncoder::Init(AVCodec* codec, AVDictionary** options) { -+void BaseEncoder::Init(const AVCodec* codec, AVDictionary** options) { - - // open codec - if(avcodec_open2(m_codec_context, codec, options) < 0) { -diff --git a/src/AV/Output/BaseEncoder.h b/src/AV/Output/BaseEncoder.h -index 3d92f29..7f02bbd 100644 ---- a/src/AV/Output/BaseEncoder.h -+++ b/src/AV/Output/BaseEncoder.h -@@ -51,7 +51,7 @@ private: - std::atomic m_should_stop, m_should_finish, m_is_done, m_error_occurred; - - protected: -- BaseEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options); -+ BaseEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options); - - public: - virtual ~BaseEncoder(); // encoders will be deleted by Muxer, don't delete them yourself! -@@ -117,7 +117,7 @@ protected: - void IncrementPacketCounter(); - - private: -- void Init(AVCodec* codec, AVDictionary** options); -+ void Init(const AVCodec* codec, AVDictionary** options); - void Free(); - - void EncoderThread(); -diff --git a/src/AV/Output/Muxer.cpp b/src/AV/Output/Muxer.cpp -index ad58380..14650b0 100644 ---- a/src/AV/Output/Muxer.cpp -+++ b/src/AV/Output/Muxer.cpp -@@ -87,7 +87,7 @@ Muxer::~Muxer() { - - VideoEncoder* Muxer::AddVideoEncoder(const QString& codec_name, const std::vector >& codec_options, - unsigned int bit_rate, unsigned int width, unsigned int height, unsigned int frame_rate) { -- AVCodec *codec = FindCodec(codec_name); -+ const AVCodec *codec = FindCodec(codec_name); - AVCodecContext *codec_context = NULL; - AVStream *stream = AddStream(codec, &codec_context); - VideoEncoder *encoder; -@@ -111,7 +111,7 @@ VideoEncoder* Muxer::AddVideoEncoder(const QString& codec_name, const std::vecto - - AudioEncoder* Muxer::AddAudioEncoder(const QString& codec_name, const std::vector >& codec_options, - unsigned int bit_rate, unsigned int channels, unsigned int sample_rate) { -- AVCodec *codec = FindCodec(codec_name); -+ const AVCodec *codec = FindCodec(codec_name); - AVCodecContext *codec_context = NULL; - AVStream *stream = AddStream(codec, &codec_context); - AudioEncoder *encoder; -@@ -194,7 +194,7 @@ unsigned int Muxer::GetQueuedPacketCount(unsigned int stream_index) { - void Muxer::Init() { - - // get the format we want (this is just a pointer, we don't have to free this) -- AVOutputFormat *format = av_guess_format(m_container_name.toUtf8().constData(), NULL, NULL); -+ const AVOutputFormat *format = av_guess_format(m_container_name.toUtf8().constData(), NULL, NULL); - if(format == NULL) { - Logger::LogError("[Muxer::Init] " + Logger::tr("Error: Can't find chosen output format!")); - throw LibavException(); -@@ -261,8 +261,8 @@ void Muxer::Free() { - } - } - --AVCodec* Muxer::FindCodec(const QString& codec_name) { -- AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData()); -+const AVCodec* Muxer::FindCodec(const QString& codec_name) { -+ const AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData()); - if(codec == NULL) { - Logger::LogError("[Muxer::FindCodec] " + Logger::tr("Error: Can't find codec!")); - throw LibavException(); -@@ -270,7 +270,7 @@ AVCodec* Muxer::FindCodec(const QString& codec_name) { - return codec; - } - --AVStream* Muxer::AddStream(AVCodec* codec, AVCodecContext** codec_context) { -+AVStream* Muxer::AddStream(const AVCodec* codec, AVCodecContext** codec_context) { - assert(!m_started); - assert(m_format_context->nb_streams < MUXER_MAX_STREAMS); - -diff --git a/src/AV/Output/Muxer.h b/src/AV/Output/Muxer.h -index d72347d..b104bcb 100644 ---- a/src/AV/Output/Muxer.h -+++ b/src/AV/Output/Muxer.h -@@ -114,8 +114,8 @@ private: - void Init(); - void Free(); - -- AVCodec* FindCodec(const QString& codec_name); -- AVStream* AddStream(AVCodec* codec, AVCodecContext** codec_context); -+ const AVCodec* FindCodec(const QString& codec_name); -+ AVStream* AddStream(const AVCodec* codec, AVCodecContext** codec_context); - - void MuxerThread(); - -diff --git a/src/AV/Output/VideoEncoder.cpp b/src/AV/Output/VideoEncoder.cpp -index 8087e8e..fc8b5d1 100644 ---- a/src/AV/Output/VideoEncoder.cpp -+++ b/src/AV/Output/VideoEncoder.cpp -@@ -34,7 +34,7 @@ const std::vector VideoEncoder::SUPPORTED_PIXEL_F - {"rgb", AV_PIX_FMT_RGB24, false}, - }; - --VideoEncoder::VideoEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options) -+VideoEncoder::VideoEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options) - : BaseEncoder(muxer, stream, codec_context, codec, options) { - - #if !SSR_USE_AVCODEC_ENCODE_VIDEO2 -@@ -95,7 +95,7 @@ unsigned int VideoEncoder::GetFrameRate() { - } - - bool VideoEncoder::AVCodecIsSupported(const QString& codec_name) { -- AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData()); -+ const AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData()); - if(codec == NULL) - return false; - if(!av_codec_is_encoder(codec)) -@@ -111,7 +111,7 @@ bool VideoEncoder::AVCodecIsSupported(const QString& codec_name) { - return false; - } - --void VideoEncoder::PrepareStream(AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options, const std::vector >& codec_options, -+void VideoEncoder::PrepareStream(AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options, const std::vector >& codec_options, - unsigned int bit_rate, unsigned int width, unsigned int height, unsigned int frame_rate) { - - if(width == 0 || height == 0) { -diff --git a/src/AV/Output/VideoEncoder.h b/src/AV/Output/VideoEncoder.h -index cb7ca27..68d872e 100644 ---- a/src/AV/Output/VideoEncoder.h -+++ b/src/AV/Output/VideoEncoder.h -@@ -40,7 +40,7 @@ private: - #endif - - public: -- VideoEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options); -+ VideoEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options); - ~VideoEncoder(); - - // Returns the required pixel format. -@@ -55,7 +55,7 @@ public: - - public: - static bool AVCodecIsSupported(const QString& codec_name); -- static void PrepareStream(AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options, const std::vector >& codec_options, -+ static void PrepareStream(AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options, const std::vector >& codec_options, - unsigned int bit_rate, unsigned int width, unsigned int height, unsigned int frame_rate); - - private: --- -2.43.0 - diff --git a/srcpkgs/ssr/template b/srcpkgs/ssr/template index 5d5c0a98d65f58..983cf4e4ad44db 100644 --- a/srcpkgs/ssr/template +++ b/srcpkgs/ssr/template @@ -1,19 +1,20 @@ # Template file for 'ssr' pkgname=ssr version=0.4.4 -revision=3 +revision=4 +_commit=e73e07664121ac30836872bca76194c6570e04c8 build_style=cmake -configure_args="-DWITH_QT5=ON" +configure_args="-DWITH_QT6=ON" hostmakedepends="pkg-config" -makedepends="alsa-lib-devel ffmpeg6-devel glu-devel jack-devel pulseaudio-devel - qt5-tools-devel qt5-x11extras-devel libXinerama-devel v4l-utils-devel" +makedepends="alsa-lib-devel ffmpeg-devel glu-devel jack-devel pulseaudio-devel + qt6-tools-devel libXinerama-devel v4l-utils-devel pipewire-devel" depends="desktop-file-utils hicolor-icon-theme" short_desc="Simple Screen Recorder for programs and games" maintainer="Orphaned " license="GPL-3.0-or-later" homepage="http://www.maartenbaert.be/simplescreenrecorder/" -distfiles="https://github.com/MaartenBaert/ssr/archive/${version}.tar.gz" -checksum=69fccf8df6e7285d4df5033eed8748f4eae13b407488906dcf4810a277d557b8 +distfiles="https://github.com/MaartenBaert/ssr/archive/${_commit}.tar.gz" +checksum=de93fb21e16118cdfa12dfe7bdd661c1f990aa55f7802c6fe293bb9c7b295c6a if [ -n "$CROSS_BUILD" ]; then hostmakedepends+=" qt5-host-tools qt5-qmake" From da6330aab223e33be49f859d7b5acd19f75126c2 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 052/115] sumo: revbump for ffmpeg9 --- srcpkgs/sumo/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template index a7797e868aa7ac..b92a67f7b940ad 100644 --- a/srcpkgs/sumo/template +++ b/srcpkgs/sumo/template @@ -1,10 +1,10 @@ # Template file for 'sumo' pkgname=sumo version=1.12.0 -revision=10 +revision=11 build_style=cmake hostmakedepends="libgdal-tools pkg-config swig python3-setuptools" -makedepends="python3-devel ffmpeg6-devel fox-devel gl2ps-devel libgdal-devel +makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel libxerces-c-devel osg-devel proj-devel" short_desc="SUMO (Simulation of Urban MObility) and included applications" maintainer="Warrior Graph " From bddc96f00450dc27f6b7154ce02757d409a8088c Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 053/115] telegram-desktop: revbump for ffmpeg9 --- srcpkgs/telegram-desktop/patches/musl-eol-cmt.patch | 8 ++++++++ srcpkgs/telegram-desktop/template | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/telegram-desktop/patches/musl-eol-cmt.patch diff --git a/srcpkgs/telegram-desktop/patches/musl-eol-cmt.patch b/srcpkgs/telegram-desktop/patches/musl-eol-cmt.patch new file mode 100644 index 00000000000000..5dedac67190ed3 --- /dev/null +++ b/srcpkgs/telegram-desktop/patches/musl-eol-cmt.patch @@ -0,0 +1,8 @@ +--- a/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp ++++ b/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp +@@ -219,4 +219,4 @@ + } + } + +-} // namespace base::Platform ++} diff --git a/srcpkgs/telegram-desktop/template b/srcpkgs/telegram-desktop/template index d42a25b6f14977..6e0b909848bba1 100644 --- a/srcpkgs/telegram-desktop/template +++ b/srcpkgs/telegram-desktop/template @@ -1,7 +1,7 @@ # Template file for 'telegram-desktop' pkgname=telegram-desktop version=7.0.4 -revision=3 +revision=4 build_style=cmake build_helper="qemu gir" configure_args="-DTDESKTOP_API_ID=209235 @@ -13,7 +13,7 @@ configure_args="-DTDESKTOP_API_ID=209235 hostmakedepends="pkg-config qt6-base python3 extra-cmake-modules qt6-declarative-host-tools wayland-devel protobuf glib-devel kf6-kcoreaddons qt6-shadertools" makedepends="alsa-lib-devel boost-devel-minimal libboost_regex - fmt-devel ffmpeg6-devel libglib-devel + fmt-devel ffmpeg-devel libglib-devel gobject-introspection libdbusmenu-glib-devel libopenal-devel minizip-devel opus-devel xxHash-devel pulseaudio-devel range-v3 qt6-svg-devel libva-devel rapidjson liblz4-devel liblzma-devel From 9525cae0398ee219c8b211b850e235c7b20788c9 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 054/115] tg_owt: revbump for ffmpeg9 --- srcpkgs/tg_owt/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/tg_owt/template b/srcpkgs/tg_owt/template index 56e2675640edaf..f7fe743b06d343 100644 --- a/srcpkgs/tg_owt/template +++ b/srcpkgs/tg_owt/template @@ -1,7 +1,7 @@ # Template file for 'tg_owt' pkgname=tg_owt version=0.0.0.20260606 -revision=1 +revision=2 _commit=26068e29bfa8d74a9dc9c8f7f94172fafbc262b8 _libyuv_commit=04821d1e7d60845525e8db55c7bcd41ef5be9406 _crc32c_commit=21fc8ef30415a635e7351ffa0e5d5367943d4a94 @@ -9,7 +9,7 @@ build_style=cmake configure_args="-DBUILD_SHARED_LIBS=OFF -DTG_OWT_ARCH_ARMV7_USE_NEON=OFF" hostmakedepends="pkg-config yasm protobuf python3" makedepends="alsa-lib-devel pulseaudio-devel openssl-devel opus-devel - pipewire-devel ffmpeg6-devel libjpeg-turbo-devel protobuf-devel + pipewire-devel ffmpeg-devel libjpeg-turbo-devel protobuf-devel libevent-devel libXcomposite-devel libXrandr-devel libXdamage-devel libepoxy-devel libdrm-devel libXrender-devel libglib-devel libgbm-devel libvpx-devel openh264-devel abseil-cpp-devel libsrtp-devel" From ea093bb88cbd94b2a80b413ae86059fac813d11b Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 055/115] tigervnc: revbump for ffmpeg9 --- srcpkgs/tigervnc/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/tigervnc/template b/srcpkgs/tigervnc/template index 97429df9b6fcf0..6e7bb58c237e3c 100644 --- a/srcpkgs/tigervnc/template +++ b/srcpkgs/tigervnc/template @@ -1,7 +1,7 @@ # Template file for 'tigervnc' pkgname=tigervnc version=1.16.2 -revision=1 +revision=2 _xorg_version=21.1.16 _xorg_dist="xorg-server-${_xorg_version}.tar.gz" build_style=cmake @@ -11,7 +11,7 @@ hostmakedepends="automake gettext xorg-util-macros font-util pkg-config makedepends="fltk-devel zlib-devel libXtst-devel libjpeg-turbo-devel pixman-devel xorgproto libxkbfile-devel libXrandr-devel libXfont2-devel gnutls-devel libdrm-devel libxshmfence-devel pam-devel xkbcomp libxcvt-devel - nettle-devel ffmpeg6-devel" + nettle-devel ffmpeg-devel" depends="perl xauth xkeyboard-config" short_desc="High performance, multi-platform VNC client and server" maintainer="Orphaned " From 884eb628b59b06b5020def0203c7f52eddcd21f8 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 056/115] unpaper: revbump for ffmpeg9 --- srcpkgs/unpaper/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/unpaper/template b/srcpkgs/unpaper/template index 94450c3fdab424..ce665a2aeffeed 100644 --- a/srcpkgs/unpaper/template +++ b/srcpkgs/unpaper/template @@ -1,10 +1,10 @@ # Template file for 'unpaper' pkgname=unpaper version=7.0.0 -revision=1 +revision=2 build_style=meson hostmakedepends="pkg-config libxslt python3-Sphinx" -makedepends="ffmpeg6-devel" +makedepends="ffmpeg-devel" short_desc="Post-processing tool for scanned sheets of paper" maintainer="Orphaned " license="GPL-2.0-or-later" From 46ae4c3487972e39d50cfb4526380ae166b4ec3d Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:48 -0500 Subject: [PATCH 057/115] waypipe: revbump for ffmpeg9 --- srcpkgs/waypipe/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/waypipe/template b/srcpkgs/waypipe/template index 5051d0577f9f3e..a85b30c916d2e0 100644 --- a/srcpkgs/waypipe/template +++ b/srcpkgs/waypipe/template @@ -1,13 +1,13 @@ # Template file for 'waypipe' pkgname=waypipe version=0.10.6 -revision=2 +revision=3 build_style=meson # lto is off because it causes linking errors in armv6l and armv7l (due to NEON) configure_args="-Dwerror=false -Db_lto=false -Dbuild_c=true -Dbuild_rs=false" hostmakedepends="wayland-devel scdoc pkg-config" makedepends="liblz4-devel libzstd-devel libva-devel - MesaLib-devel libdrm-devel ffmpeg6-devel" + MesaLib-devel libdrm-devel ffmpeg-devel" depends="openssh" short_desc="Proxy for Wayland clients" maintainer="Érico Nogueira " From bb1ec81827a232b5534d6af73d98ceed79ea0b88 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:48 -0500 Subject: [PATCH 058/115] wf-recorder: revbump for ffmpeg9 --- .../patches/wf-recorder-ffmpeg-9.patch | 102 ++++++++++++++++++ srcpkgs/wf-recorder/template | 4 +- 2 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/wf-recorder/patches/wf-recorder-ffmpeg-9.patch diff --git a/srcpkgs/wf-recorder/patches/wf-recorder-ffmpeg-9.patch b/srcpkgs/wf-recorder/patches/wf-recorder-ffmpeg-9.patch new file mode 100644 index 00000000000000..05c66e5440ecc5 --- /dev/null +++ b/srcpkgs/wf-recorder/patches/wf-recorder-ffmpeg-9.patch @@ -0,0 +1,102 @@ +# https://gitlab.archlinux.org/archlinux/packaging/packages/wf-recorder/-/blob/main/ffmpeg-9.patch?ref_type=heads +diff -ru wf-recorder-0.6.0.orig/src/frame-writer.cpp wf-recorder-0.6.0/src/frame-writer.cpp +--- wf-recorder-0.6.0.orig/src/frame-writer.cpp 2026-08-05 22:45:21.011131639 +0200 ++++ wf-recorder-0.6.0/src/frame-writer.cpp 2026-08-05 22:51:54.002616057 +0200 +@@ -192,21 +192,23 @@ + auto in_fmt = get_input_format(); + + /* For codecs such as rawvideo no supported formats are listed */ +- if (!codec->pix_fmts) ++ const AVPixelFormat* codec_pix_fmts = nullptr; ++ avcodec_get_supported_config(nullptr, codec, AV_CODEC_CONFIG_PIX_FORMAT, 0, (const void**)&codec_pix_fmts, nullptr); ++ if (!codec_pix_fmts) + return in_fmt; + + /* If the codec supports getting the appropriate RGB format + * directly, we want to use it since we don't have to convert data */ +- if (is_fmt_supported(in_fmt, codec->pix_fmts)) ++ if (is_fmt_supported(in_fmt, codec_pix_fmts)) + return in_fmt; + + /* Choose the format supported by the codec which best approximates the + * input fmt. */ + AVPixelFormat best_format = AV_PIX_FMT_NONE; +- for (int i = 0; codec->pix_fmts[i] != AV_PIX_FMT_NONE; i++) { ++ for (int i = 0; codec_pix_fmts[i] != AV_PIX_FMT_NONE; i++) { + int loss = 0; + best_format = av_find_best_pix_fmt_of_2(best_format, +- codec->pix_fmts[i], in_fmt, false, &loss); ++ codec_pix_fmts[i], in_fmt, false, &loss); + } + return best_format; + } +@@ -518,16 +520,18 @@ + static uint64_t get_codec_channel_layout(const AVCodec *codec) + { + int i = 0; +- if (!codec->ch_layouts) ++ const AVChannelLayout *codec_ch_layouts = nullptr; ++ avcodec_get_supported_config(nullptr, codec, AV_CODEC_CONFIG_CHANNEL_LAYOUT, 0, (const void**)&codec_ch_layouts, nullptr); ++ if (!codec_ch_layouts) + return AV_CH_LAYOUT_STEREO; + while (1) { +- if (!av_channel_layout_check(&codec->ch_layouts[i])) ++ if (!av_channel_layout_check(&codec_ch_layouts[i])) + break; +- if (codec->ch_layouts[i].u.mask == AV_CH_LAYOUT_STEREO) +- return codec->ch_layouts[i].u.mask; ++ if (codec_ch_layouts[i].u.mask == AV_CH_LAYOUT_STEREO) ++ return codec_ch_layouts[i].u.mask; + i++; + } +- return codec->ch_layouts[0].u.mask; ++ return codec_ch_layouts[0].u.mask; + } + #else + static uint64_t get_codec_channel_layout(const AVCodec *codec) +@@ -549,20 +553,24 @@ + static enum AVSampleFormat get_codec_auto_sample_fmt(const AVCodec *codec) + { + int i = 0; +- if (!codec->sample_fmts) ++ const AVSampleFormat *codec_sample_fmts = nullptr; ++ avcodec_get_supported_config(nullptr, codec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0, (const void**)&codec_sample_fmts, nullptr); ++ if (!codec_sample_fmts) + return av_get_sample_fmt(FALLBACK_AUDIO_SAMPLE_FMT); + while (1) { +- if (codec->sample_fmts[i] == -1) ++ if (codec_sample_fmts[i] == -1) + break; +- if (av_get_bytes_per_sample(codec->sample_fmts[i]) >= 2) +- return codec->sample_fmts[i]; ++ if (av_get_bytes_per_sample(codec_sample_fmts[i]) >= 2) ++ return codec_sample_fmts[i]; + i++; + } +- return codec->sample_fmts[0]; ++ return codec_sample_fmts[0]; + } + + bool check_fmt_available(const AVCodec *codec, AVSampleFormat fmt){ +- for (const enum AVSampleFormat *sample_ptr = codec -> sample_fmts; *sample_ptr != -1; sample_ptr++) ++ const AVSampleFormat *codec_sample_fmts = nullptr; ++ avcodec_get_supported_config(nullptr, codec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0, (const void**)&codec_sample_fmts, nullptr); ++ for (const enum AVSampleFormat *sample_ptr = codec_sample_fmts; *sample_ptr != -1; sample_ptr++) + { + if (*sample_ptr == fmt) + { +@@ -575,11 +583,13 @@ + static enum AVSampleFormat convert_codec_sample_fmt(const AVCodec *codec, std::string requested_fmt) + { + static enum AVSampleFormat converted_fmt = av_get_sample_fmt(requested_fmt.c_str()); ++ const AVSampleFormat *codec_sample_fmts = nullptr; ++ avcodec_get_supported_config(nullptr, codec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0, (const void**)&codec_sample_fmts, nullptr); + if (converted_fmt == AV_SAMPLE_FMT_NONE) + { + std::cerr << "Failed to find the given sample format: " << requested_fmt << std::endl; + std::exit(-1); +- } else if (!codec->sample_fmts || check_fmt_available(codec, converted_fmt)) ++ } else if (!codec_sample_fmts || check_fmt_available(codec, converted_fmt)) + { + std::cerr << "Using sample format " << av_get_sample_fmt_name(converted_fmt) << " for audio codec " << codec->name << std::endl; + return converted_fmt; diff --git a/srcpkgs/wf-recorder/template b/srcpkgs/wf-recorder/template index 9ae0b1cf9e3448..c7a36e4bc012e5 100644 --- a/srcpkgs/wf-recorder/template +++ b/srcpkgs/wf-recorder/template @@ -1,11 +1,11 @@ # Template file for 'wf-recorder' pkgname=wf-recorder version=0.6.0 -revision=1 +revision=2 build_style=meson hostmakedepends="pkg-config scdoc wayland-devel" makedepends="wayland-protocols wayland-devel libgbm-devel libdrm-devel - ffmpeg6-devel x264-devel pulseaudio-devel pipewire-devel" + ffmpeg-devel x264-devel pulseaudio-devel pipewire-devel" short_desc="Screen recorder for wlroots-based compositors" maintainer="Jony " license="MIT" From 9b65725a805a252859a091c464a10ce0b9a63e1e Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:48 -0500 Subject: [PATCH 059/115] xine-lib: revbump for ffmpeg9 --- srcpkgs/xine-lib/patches/ffmpeg7-1.patch | 182 +++++++++ srcpkgs/xine-lib/patches/ffmpeg7-2.patch | 60 +++ srcpkgs/xine-lib/patches/ffmpeg7-3.patch | 161 ++++++++ srcpkgs/xine-lib/patches/ffmpeg7-4.patch | 447 +++++++++++++++++++++++ srcpkgs/xine-lib/patches/ffmpeg7-5.patch | 318 ++++++++++++++++ srcpkgs/xine-lib/patches/ffmpeg8-1.patch | 114 ++++++ srcpkgs/xine-lib/template | 4 +- 7 files changed, 1284 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/xine-lib/patches/ffmpeg7-1.patch create mode 100644 srcpkgs/xine-lib/patches/ffmpeg7-2.patch create mode 100644 srcpkgs/xine-lib/patches/ffmpeg7-3.patch create mode 100644 srcpkgs/xine-lib/patches/ffmpeg7-4.patch create mode 100644 srcpkgs/xine-lib/patches/ffmpeg7-5.patch create mode 100644 srcpkgs/xine-lib/patches/ffmpeg8-1.patch diff --git a/srcpkgs/xine-lib/patches/ffmpeg7-1.patch b/srcpkgs/xine-lib/patches/ffmpeg7-1.patch new file mode 100644 index 00000000000000..1599d432b8a51e --- /dev/null +++ b/srcpkgs/xine-lib/patches/ffmpeg7-1.patch @@ -0,0 +1,182 @@ +# HG changeset patch +# User Torsten Jager +# Date 1674929040 -3600 +# Sat Jan 28 19:04:00 2023 +0100 +# Node ID 771f4ae27e582123ff3500444718fc8f96186d74 +# Parent 250f1c09f4244c3e7ca7d414410c57bd387792c3 +ffmpeg compatibility update. + +diff -r 250f1c09f424 -r 771f4ae27e58 src/combined/ffmpeg/demux_avformat.c +--- a/src/combined/ffmpeg/demux_avformat.c Wed Jan 25 17:03:55 2023 +0100 ++++ b/src/combined/ffmpeg/demux_avformat.c Sat Jan 28 19:04:00 2023 +0100 +@@ -423,8 +423,13 @@ + } + + #ifdef XFF_CODECPAR ++# if XFF_AUDIO_CHANNEL_LAYOUT < 2 + if (st->codecpar && st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && + st->codecpar->sample_rate != 0 && st->codecpar->channels != 0) ++# else ++ if (st->codecpar && st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && ++ st->codecpar->sample_rate != 0 && st->codecpar->ch_layout.nb_channels != 0) ++# endif + #else + if (st->codec && st->codec->codec_type == AVMEDIA_TYPE_AUDIO && + st->codec->sample_rate != 0 && st->codec->channels != 0) +@@ -501,7 +506,11 @@ + buf->size = extradata_size + sizeof(xine_waveformatex); + buf->decoder_info[1] = ctx->sample_rate; + buf->decoder_info[2] = ctx->bits_per_coded_sample; ++#if XFF_AUDIO_CHANNEL_LAYOUT < 2 + buf->decoder_info[3] = ctx->channels; ++#else ++ buf->decoder_info[3] = ctx->ch_layout.nb_channels; ++#endif + buf->decoder_flags = BUF_FLAG_HEADER | BUF_FLAG_STDHEADER | BUF_FLAG_FRAME_END; + + this->stream->audio_fifo->put (this->stream->audio_fifo, buf); +diff -r 250f1c09f424 -r 771f4ae27e58 src/combined/ffmpeg/ff_audio_decoder.c +--- a/src/combined/ffmpeg/ff_audio_decoder.c Wed Jan 25 17:03:55 2023 +0100 ++++ b/src/combined/ffmpeg/ff_audio_decoder.c Sat Jan 28 19:04:00 2023 +0100 +@@ -303,7 +303,11 @@ + + this->context->bits_per_sample = this->ff_bits; + this->context->sample_rate = this->ff_sample_rate; ++#if XFF_AUDIO_CHANNEL_LAYOUT < 2 + this->context->channels = this->ff_channels; ++#else ++ this->context->ch_layout.nb_channels = this->ff_channels; ++#endif + this->context->codec_id = this->codec->id; + this->context->codec_type = this->codec->type; + this->context->codec_tag = _x_stream_info_get(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC); +@@ -527,16 +531,75 @@ + this->ao_mode = 0; + } + ++static unsigned int ff_list_channels (uint8_t *list, uint64_t map) { ++ unsigned int n, bit; ++ ++ for (n = bit = 0; map; map >>= 1, bit++) { ++ uint32_t b = map & 1; ++ ++ list[n] = bit; ++ n += b; ++ } ++ return n; ++} ++ + static void ff_map_channels (ff_audio_decoder_t *this) { + uint64_t ff_map; ++ uint8_t ff_list[64]; ++ unsigned int ff_num; ++ const char *type = "native"; + int caps = this->stream->audio_out->get_capabilities (this->stream->audio_out); + ++#if XFF_AUDIO_CHANNEL_LAYOUT < 2 ++ + /* safety kludge for very old libavcodec */ +-#ifdef AV_CH_FRONT_LEFT ++# ifdef AV_CH_FRONT_LEFT + ff_map = this->context->channel_layout; + if (!ff_map) /* wma2 bug */ ++# endif ++ ff_map = ((uint64_t)1 << this->context->channels) - 1; ++ ff_num = ff_list_channels (ff_list, ff_map); ++ ++#else /* XFF_AUDIO_CHANNEL_LAYOUT == 2 */ ++ ++ ff_num = this->context->ch_layout.nb_channels; ++ if (ff_num > (int)(sizeof (ff_list) / sizeof (ff_list[0]))) ++ ff_num = sizeof (ff_list) / sizeof (ff_list[0]); ++ switch (this->context->ch_layout.order) { ++ const AVChannelCustom *cmap; ++ unsigned int i; ++ ++ case AV_CHANNEL_ORDER_UNSPEC: ++ type = "unknown"; ++ goto _fallback; ++ ++ case AV_CHANNEL_ORDER_NATIVE: ++ ff_map = this->context->ch_layout.u.mask; ++ if (!ff_map) /* wma2 bug */ ++ ff_map = ((uint64_t)1 << ff_num) - 1; ++ ff_num = ff_list_channels (ff_list, ff_map); ++ break; ++ ++ case AV_CHANNEL_ORDER_CUSTOM: ++ type = "custom"; ++ if (!(cmap = this->context->ch_layout.u.map)) ++ goto _fallback; ++ ff_map = 0; ++ for (i = 0; i < ff_num; i++) { ++ ff_list[i] = cmap[i].id; ++ ff_map |= (uint64_t)1 << ff_list[i]; ++ } ++ break; ++ ++ default: ++ type = "unsupported"; ++ /* fall through */ ++ _fallback: ++ ff_map = ((uint64_t)1 << ff_num) - 1; ++ ff_num = ff_list_channels (ff_list, ff_map); ++ } ++ + #endif +- ff_map = ((uint64_t)1 << this->context->channels) - 1; + + if ((caps != this->ao_caps) || (ff_map != this->ff_map)) { + unsigned int i, j; +@@ -562,7 +625,7 @@ + + this->ao_caps = caps; + this->ff_map = ff_map; +- this->ff_channels = this->context->channels; ++ this->ff_channels = ff_num; + + /* silence out */ + for (i = 0; i < MAX_CHANNELS; i++) +@@ -576,20 +639,23 @@ + this->left[0] = this->right[0] = 0; + tries = wishlist + 0 * num_modes; + } else if (this->ff_channels == 2) { /* stereo */ ++ /* FIXME: libxine does not yet support audio selection _after_ decoding. ++ * For now, treat the most common "dual mono" case as stereo. */ + name_map[0] = 0; + name_map[1] = 1; + this->left[0] = 0; + this->right[0] = 1; + tries = wishlist + 1 * num_modes; + } else { +- for (i = j = 0; i < sizeof (base_map) / sizeof (base_map[0]); i++) { +- if ((ff_map >> i) & 1) { +- int8_t target = base_map[i]; +- if ((target >= 0) && (this->map[target] < 0)) +- this->map[target] = j; +- name_map[j] = i; /* for debug output below */ +- j++; +- } ++ for (i = 0; i < ff_num; i++) { ++ int8_t target; ++ uint32_t num = ff_list[i]; ++ if (num >= sizeof (base_map) / sizeof (base_map[0])) ++ continue; ++ target = base_map[num]; ++ if ((target >= 0) && (this->map[target] < 0)) ++ this->map[target] = i; ++ name_map[i] = num; /* for debug output below */ + } + this->left[0] = this->map[0] < 0 ? 0 : this->map[0]; + this->map[0] = -1; +@@ -641,8 +707,8 @@ + "rear center", + "side left", "side right" + }; +- int8_t buf[200]; +- int p = sprintf (buf, "ff_audio_dec: channel layout: "); ++ int8_t buf[256]; ++ int p = sprintf (buf, "ff_audio_dec: %s channel layout: ", type); + int8_t *indx = this->left; + for (i = 0; i < 2; i++) { + buf[p++] = '['; diff --git a/srcpkgs/xine-lib/patches/ffmpeg7-2.patch b/srcpkgs/xine-lib/patches/ffmpeg7-2.patch new file mode 100644 index 00000000000000..63bd2f80091929 --- /dev/null +++ b/srcpkgs/xine-lib/patches/ffmpeg7-2.patch @@ -0,0 +1,60 @@ +# HG changeset patch +# User Torsten Jager +# Date 1675683900 -3600 +# Mon Feb 06 12:45:00 2023 +0100 +# Node ID 0a786d63bbdb2d780a9231f6772e84e743c72014 +# Parent b0a36ed8ec8f3f2de545502b93ec846561168b64 +Try to silence some cast align warnings 4. + +diff -r b0a36ed8ec8f -r 0a786d63bbdb src/combined/ffmpeg/ff_video_decoder.c +--- a/src/combined/ffmpeg/ff_video_decoder.c Mon Feb 06 12:44:55 2023 +0100 ++++ b/src/combined/ffmpeg/ff_video_decoder.c Mon Feb 06 12:45:00 2023 +0100 +@@ -1398,7 +1398,7 @@ + #if defined(AV_PIX_FMT_YUV420P9) || defined(AV_PIX_FMT_YUV420P10) + static void ff_get_deep_color (uint8_t *src, int sstride, uint8_t *dest, int dstride, + int width, int height, uint8_t *tab) { +- uint16_t *p = (uint16_t *) src; ++ uint16_t *p = (uint16_t *)ASSUME_ALIGNED_2 (src, 2); + uint8_t *q = dest; + int spad = sstride / 2 - width; + int dpad = dstride - width; +@@ -1804,22 +1804,24 @@ + #ifdef XFF_AVCODEC_SUB_ID + this->context->sub_id = _X_BE_32(&this->buf[30]); + #endif +- this->context->extradata_size = this->size - 26; +- if (this->context->extradata_size < 8) { +- this->context->extradata_size= 8; +- this->context->extradata = calloc(1, this->context->extradata_size + +- AV_INPUT_BUFFER_PADDING_SIZE); +- ((uint32_t *)this->context->extradata)[0] = 0; +- if (codec_type == BUF_VIDEO_RV10) +- ((uint32_t *)this->context->extradata)[1] = 0x10000000; +- else +- ((uint32_t *)this->context->extradata)[1] = 0x10003001; ++ if (this->size < 8 + 26) { ++ uint32_t *b = calloc (1, 8 + AV_INPUT_BUFFER_PADDING_SIZE); ++ if (b) { ++ this->context->extradata_size = 8; ++ this->context->extradata = (uint8_t *)b; ++ b[0] = 0; ++ if (codec_type == BUF_VIDEO_RV10) ++ b[1] = 0x10000000; ++ else ++ b[1] = 0x10003001; ++ } + } else { +- this->context->extradata = malloc(this->context->extradata_size + +- AV_INPUT_BUFFER_PADDING_SIZE); +- memcpy(this->context->extradata, this->buf + 26, +- this->context->extradata_size); +- memset(this->context->extradata + this->context->extradata_size, 0, AV_INPUT_BUFFER_PADDING_SIZE); ++ this->context->extradata = malloc (this->size - 26 + AV_INPUT_BUFFER_PADDING_SIZE); ++ if (this->context->extradata) { ++ this->context->extradata_size = this->size - 26; ++ memcpy (this->context->extradata, this->buf + 26, this->context->extradata_size); ++ memset (this->context->extradata + this->context->extradata_size, 0, AV_INPUT_BUFFER_PADDING_SIZE); ++ } + } + + xprintf(this->stream->xine, XINE_VERBOSITY_LOG, diff --git a/srcpkgs/xine-lib/patches/ffmpeg7-3.patch b/srcpkgs/xine-lib/patches/ffmpeg7-3.patch new file mode 100644 index 00000000000000..36b07bb7e0a0f6 --- /dev/null +++ b/srcpkgs/xine-lib/patches/ffmpeg7-3.patch @@ -0,0 +1,161 @@ +# HG changeset patch +# User Torsten Jager +# Date 1675683905 -3600 +# Mon Feb 06 12:45:05 2023 +0100 +# Node ID 6f1000084f6084f49c95c202d12593e49916f58b +# Parent 0a786d63bbdb2d780a9231f6772e84e743c72014 +Try to silence some cast align warnings 5. + +diff -r 0a786d63bbdb -r 6f1000084f60 src/combined/ffmpeg/ff_audio_decoder.c +--- a/src/combined/ffmpeg/ff_audio_decoder.c Mon Feb 06 12:45:00 2023 +0100 ++++ b/src/combined/ffmpeg/ff_audio_decoder.c Mon Feb 06 12:45:05 2023 +0100 +@@ -796,7 +796,7 @@ + #define CLIP_16(v) ((v + 0x8000) & ~0xffff ? (v >> 31) ^ 0x7fff : v) + + static int ff_audio_decode (ff_audio_decoder_t *this) { +- int16_t *decode_buffer = (int16_t *)this->send.buf; ++ int16_t *decode_buffer = (int16_t *)ASSUME_ALIGNED_2 (this->send.buf, 2); + int consumed, got_frame = 0; + #if XFF_AUDIO >= 4 + float gain = this->class->gain; +@@ -871,13 +871,13 @@ + const stype *p1, *p2, *p3, *p4;\ + int i, sstep;\ + int8_t *x = idx;\ +- int16_t *dptr = (int16_t *)decode_buffer + dindx;\ ++ int16_t *dptr = decode_buffer + dindx;\ + if (planar) {\ +- p1 = (stype *)this->av_frame->extended_data[x[0]];\ ++ p1 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[x[0]], sizeof (stype));\ + if (!p1) break;\ + sstep = 1;\ + } else {\ +- p1 = (stype *)this->av_frame->extended_data[0];\ ++ p1 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[0], sizeof (stype));\ + if (!p1) break;\ + p1 += x[0];\ + sstep = this->ff_channels;\ +@@ -893,10 +893,10 @@ + break;\ + }\ + if (planar) {\ +- p2 = (stype *)this->av_frame->extended_data[x[1]];\ ++ p2 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[x[1]], sizeof (stype));\ + if (!p2) break;\ + } else\ +- p2 = (stype *)this->av_frame->extended_data[0] + x[1];\ ++ p2 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[0], sizeof (stype)) + x[1];\ + if (num == 2) {\ + for (i = 0; i < samples; i++) {\ + int32_t v = MIX_FIX(*p2);\ +@@ -911,10 +911,10 @@ + break;\ + }\ + if (planar) {\ +- p3 = (stype *)this->av_frame->extended_data[x[2]];\ ++ p3 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[x[2]], sizeof (stype));\ + if (!p3) break;\ + } else\ +- p3 = (stype *)this->av_frame->extended_data[0] + x[2];\ ++ p3 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[0], sizeof (stype)) + x[2];\ + if (num == 3) {\ + for (i = 0; i < samples; i++) {\ + int32_t v = MIX_FIX(*p2);\ +@@ -931,10 +931,10 @@ + break;\ + }\ + if (planar) {\ +- p4 = (stype *)this->av_frame->extended_data[x[3]];\ ++ p4 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[x[3]], sizeof (stype));\ + if (!p4) break;\ + } else\ +- p4 = (stype *)this->av_frame->extended_data[0] + x[3];\ ++ p4 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[0], sizeof (stype)) + x[3];\ + for (i = 0; i < samples; i++) {\ + int32_t v = MIX_FIX(*p2);\ + p2 += sstep;\ +@@ -1003,13 +1003,13 @@ + int i, sstep;\ + float gain3;\ + int8_t *x = idx;\ +- int16_t *dptr = (int16_t *)decode_buffer + dindx;\ ++ int16_t *dptr = decode_buffer + dindx;\ + if (planar) {\ +- p1 = (stype *)this->av_frame->extended_data[x[0]];\ ++ p1 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[x[0]], sizeof (stype));\ + if (!p1) break;\ + sstep = 1;\ + } else {\ +- p1 = (stype *)this->av_frame->extended_data[0];\ ++ p1 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[0], sizeof (stype));\ + if (!p1) break;\ + p1 += x[0];\ + sstep = this->ff_channels;\ +@@ -1025,10 +1025,10 @@ + }\ + gain3 = gain * 0.7071;\ + if (planar) {\ +- p2 = (stype *)this->av_frame->extended_data[x[1]];\ ++ p2 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[x[1]], sizeof (stype));\ + if (!p2) break;\ + } else\ +- p2 = (stype *)this->av_frame->extended_data[0] + x[1];\ ++ p2 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[0], sizeof (stype)) + x[1];\ + if (num == 2) {\ + for (i = 0; i < samples; i++) {\ + int32_t v = (*p1) * gain + (*p2) * gain3;\ +@@ -1040,10 +1040,10 @@ + break;\ + }\ + if (planar) {\ +- p3 = (stype *)this->av_frame->extended_data[x[2]];\ ++ p3 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[x[2]], sizeof (stype));\ + if (!p3) break;\ + } else\ +- p3 = (stype *)this->av_frame->extended_data[0] + x[2];\ ++ p3 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[0], sizeof (stype)) + x[2];\ + if (num == 3) {\ + for (i = 0; i < samples; i++) {\ + int32_t v = (*p1) * gain + (*p2 + *p3) * gain3;\ +@@ -1056,10 +1056,10 @@ + break;\ + }\ + if (planar) {\ +- p4 = (stype *)this->av_frame->extended_data[x[3]];\ ++ p4 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[x[3]], sizeof (stype));\ + if (!p4) break;\ + } else\ +- p4 = (stype *)this->av_frame->extended_data[0] + x[3];\ ++ p4 = (stype *)ASSUME_ALIGNED_2 (this->av_frame->extended_data[0], sizeof (stype)) + x[3];\ + for (i = 0; i < samples; i++) {\ + int32_t v = (*p1) * gain + (*p2 + *p3 + *p4) * gain3;\ + p1 += sstep;\ +@@ -1240,8 +1240,8 @@ + /* the above codecs output float samples, not 16-bit integers */ + int samples = this->send.len / sizeof(float); + float gain = this->class->gain; +- float *p = (float *)this->decode_buffer; +- int16_t *q = (int16_t *)this->decode_buffer; ++ float *p = (float *)ASSUME_ALIGNED_2 (this->decode_buffer, 4); ++ int16_t *q = (int16_t *)ASSUME_ALIGNED_2 (this->decode_buffer, 2); + int i; + for (i = samples; i; i--) { + int v = *p++ * gain; +@@ -1255,7 +1255,7 @@ + int samples = this->send.len / (this->ff_channels * 2); + int channels = this->ao_channels; + int ff_channels = this->ff_channels; +- int16_t *p = (int16_t *)this->decode_buffer; ++ int16_t *p = (int16_t *)ASSUME_ALIGNED_2 (this->decode_buffer, 2); + int16_t *q = p; + int shift = this->downmix_shift, i, j; + /* downmix mono output to stereo first */ +@@ -1300,7 +1300,7 @@ + } + /* final mono downmix */ + if (channels > this->ao_channels) { +- p = (int16_t *)this->decode_buffer; ++ p = (int16_t *)ASSUME_ALIGNED_2 (this->decode_buffer, 2); + q = p; + for (i = samples; i; i--) { + int v = *p++; diff --git a/srcpkgs/xine-lib/patches/ffmpeg7-4.patch b/srcpkgs/xine-lib/patches/ffmpeg7-4.patch new file mode 100644 index 00000000000000..d3bd5a71c757d6 --- /dev/null +++ b/srcpkgs/xine-lib/patches/ffmpeg7-4.patch @@ -0,0 +1,447 @@ +# HG changeset patch +# User Torsten Jager +# Date 1715025355 -7200 +# Mon May 06 21:55:55 2024 +0200 +# Node ID 1e7b184008860c8be2289c3cefd9dee57f06193a +# Parent d1954d852980ddc887a67a9f1a26626909561ff5 +ffmpeg compatibility update 1. + +diff -r d1954d852980 -r 1e7b18400886 src/combined/ffmpeg/ff_audio_decoder.c +--- a/src/combined/ffmpeg/ff_audio_decoder.c Mon Apr 08 13:25:10 2024 +0200 ++++ b/src/combined/ffmpeg/ff_audio_decoder.c Mon May 06 21:55:55 2024 +0200 +@@ -67,6 +67,7 @@ + + xine_t *xine; + float gain; ++ int bitexact; + } ff_audio_class_t; + + typedef struct ff_audio_decoder_s { +@@ -188,14 +189,25 @@ + xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, + "ffmpeg_audio_dec: found AAC ADTS syncword after %d bytes\n", i); + if (this->buftype == BUF_AUDIO_AAC_LATM) { ++ uint8_t *ed = NULL; ++ int es = 0; + xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, + "ffmpeg_audio_dec: stream says LATM but is ADTS -> switching decoders\n"); +- if (this->decoder_ok) { +- pthread_mutex_lock (&ffmpeg_lock); +- avcodec_close (this->context); +- pthread_mutex_unlock (&ffmpeg_lock); +- this->decoder_ok = 0; ++ pthread_mutex_lock (&ffmpeg_lock); ++ if (this->context) { ++ ed = this->context->extradata; ++ es = this->context->extradata_size; ++ this->context->extradata = NULL; ++ this->context->extradata_size = 0; ++ XFF_FREE_CONTEXT (this->context); + } ++ this->decoder_ok = 0; ++ this->context = XFF_ALLOC_CONTEXT (); ++ if (this->context) { ++ this->context->extradata = ed; ++ this->context->extradata_size = es; ++ } ++ pthread_mutex_unlock (&ffmpeg_lock); + this->codec = NULL; + ff_audio_open_codec (this, BUF_AUDIO_AAC); + } +@@ -349,6 +361,11 @@ + return -1; + } + ++ if (this->class->bitexact) ++ this->context->flags |= CODEC_FLAG_BITEXACT; ++ else ++ this->context->flags &= ~CODEC_FLAG_BITEXACT; ++ + pthread_mutex_lock (&ffmpeg_lock); + if (XFF_AVCODEC_OPEN (this->context, this->codec) < 0) { + pthread_mutex_unlock (&ffmpeg_lock); +@@ -1377,9 +1394,21 @@ + } + #endif + pthread_mutex_lock (&ffmpeg_lock); +- avcodec_close (this->context); +- if (XFF_AVCODEC_OPEN (this->context, this->codec) < 0) ++ { ++ uint8_t *ed = this->context->extradata; ++ int es = this->context->extradata_size; ++ this->context->extradata = NULL; ++ this->context->extradata_size = 0; ++ XFF_FREE_CONTEXT (this->context); + this->decoder_ok = 0; ++ this->context = XFF_ALLOC_CONTEXT (); ++ if (this->context) { ++ this->context->extradata = ed; ++ this->context->extradata_size = es; ++ } ++ } ++ if (XFF_AVCODEC_OPEN (this->context, this->codec) >= 0) ++ this->decoder_ok = 1; + pthread_mutex_unlock (&ffmpeg_lock); + } + +@@ -1418,20 +1447,20 @@ + XFF_FREE_FRAME (this->av_frame); + } + #endif +- pthread_mutex_lock (&ffmpeg_lock); +- avcodec_close (this->context); +- pthread_mutex_unlock (&ffmpeg_lock); + } ++ pthread_mutex_lock (&ffmpeg_lock); ++ if (this->context) { ++ _x_freep (&this->context->extradata); ++ this->context->extradata_size = 0; ++ XFF_FREE_CONTEXT (this->context); ++ } ++ pthread_mutex_unlock (&ffmpeg_lock); + + ff_audio_output_close(this); + + xine_free_aligned (this->buf); + xine_free_aligned (this->decode_buffer); + +- _x_freep (&this->context->extradata); +- this->context->extradata_size = 0; +- XFF_FREE_CONTEXT (this->context); +- + XFF_PACKET_UNREF (this->avpkt); + + xine_pts_queue_delete (&this->pts_queue); +@@ -1513,6 +1542,12 @@ + free (this); + } + ++static void ff_bitexact_cb (void *user_data, xine_cfg_entry_t *entry) { ++ ff_audio_class_t *class = (ff_audio_class_t *)user_data; ++ ++ class->bitexact = entry->num_value; ++} ++ + void *init_audio_plugin (xine_t *xine, const void *data) { + + ff_audio_class_t *this ; +@@ -1540,5 +1575,12 @@ + 10, ff_gain_cb, this) + / (float)20); + ++ this->bitexact = xine->config->register_bool (xine->config, ++ "audio.processing.ffmpeg_bitexact", 0, ++ _("Let FFmpeg use precise but slower math"), ++ _("Get slightly better sound, at the expense of speed.\n" ++ "Takes effect with next stream."), ++ 10, ff_bitexact_cb, this); ++ + return this; + } +diff -r d1954d852980 -r 1e7b18400886 src/combined/ffmpeg/ff_video_decoder.c +--- a/src/combined/ffmpeg/ff_video_decoder.c Mon Apr 08 13:25:10 2024 +0200 ++++ b/src/combined/ffmpeg/ff_video_decoder.c Mon May 06 21:55:55 2024 +0200 +@@ -128,6 +128,7 @@ + + int64_t pts; + int64_t last_pts; ++ int64_t tagged_pts; + int video_step; + int reported_video_step; + uint8_t pts_tag_pass; +@@ -551,7 +552,9 @@ + # ifdef XFF_FRAME_AGE + av_frame->age = 1; + # endif ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE + av_frame->reordered_opaque = context->reordered_opaque; ++#endif + + ffsf = ffsf_new (this); + if (!ffsf) +@@ -862,7 +865,9 @@ + # endif + + /* take over pts for this frame to have it reordered */ ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE + av_frame->reordered_opaque = context->reordered_opaque; ++#endif + + return 0; + } +@@ -1142,9 +1147,13 @@ + if (this->codec->id == CODEC_ID_VC1 && + (!this->bih.biWidth || !this->bih.biHeight)) { + /* VC1 codec must be re-opened with correct width and height. */ +- avcodec_close(this->context); +- +- if (XFF_AVCODEC_OPEN (this->context, this->codec) < 0) { ++ if (this->context) { ++ _x_freep (&this->context->extradata); ++ this->context->extradata_size = 0; ++ XFF_FREE_CONTEXT (this->context); ++ } ++ this->context = XFF_ALLOC_CONTEXT (); ++ if (!(this->context && XFF_AVCODEC_OPEN (this->context, this->codec) >= 0)) { + pthread_mutex_unlock(&ffmpeg_lock); + xprintf (this->stream->xine, XINE_VERBOSITY_LOG, + _("ffmpeg_video_dec: couldn't open decoder (pass 2)\n")); +@@ -1211,6 +1220,11 @@ + /* dont want initial AV_NOPTS_VALUE here */ + this->context->reordered_opaque = 0; + #endif ++ ++#ifdef XFF_AVCODEC_FRAME_PTS ++ this->context->time_base.num = 1; ++ this->context->time_base.den = 90000 << 8; ++#endif + } + + #ifdef ENABLE_VAAPI +@@ -1959,7 +1973,26 @@ + return (pts * 256) | this->pts_tag_pass; + } + +-static int64_t ff_untag_pts (ff_video_decoder_t *this, int64_t pts) { ++static int64_t ff_untag_pts (ff_video_decoder_t *this, AVFrame *av_frame) { ++ int64_t pts; ++#if defined(XFF_AVCODEC_FRAME_PTS) ++ pts = (av_frame->pts != AV_NOPTS_VALUE) ? av_frame->pts : 0; ++# if defined(XFF_AVCODEC_REORDERED_OPAQUE) ++ /* paranoia !!! */ ++ if (pts != av_frame->reordered_opaque) { ++ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, ++ LOG_MODULE ": WARNING: frame pts %" PRId64 " != reordered_opaque %" PRId64 ".\n", ++ pts, av_frame->reordered_opaque); ++ pts = av_frame->reordered_opaque; ++ } ++ av_frame->reordered_opaque = 0; ++# endif ++#elif defined(XFF_AVCODEC_REORDERED_OPAQUE) ++ pts = av_frame->reordered_opaque; ++ av_frame->reordered_opaque = 0; ++#else ++ pts = this->tagged_pts; ++#endif + if ((uint8_t)(pts & 0xff) == this->pts_tag_pass) { + /* restore sign. */ + return pts >> 8; +@@ -1984,7 +2017,9 @@ + this->avpkt->data = buf; + this->avpkt->size = buf_size; + this->avpkt->flags = AV_PKT_FLAG_KEY; +- ++# ifdef XFF_AVCODEC_FRAME_PTS ++ this->avpkt->pts = this->tagged_pts; ++# endif + # if XFF_PALETTE == 2 || XFF_PALETTE == 3 + if (buf && this->palette_changed) { + uint8_t *sd = av_packet_new_side_data (this->avpkt, AV_PKT_DATA_PALETTE, 256 * 4); +@@ -2094,9 +2129,14 @@ + #endif + + /* apply valid pts to first frame _starting_ thereafter only */ +- if (this->pts && !this->context->reordered_opaque) { +- this->context->reordered_opaque = +- this->av_frame->reordered_opaque = ff_tag_pts (this, this->pts); ++ if (this->pts && !this->tagged_pts) { ++ this->tagged_pts = ff_tag_pts (this, this->pts); ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE ++ this->context->reordered_opaque = this->av_frame->reordered_opaque = this->tagged_pts; ++#endif ++#ifdef XFF_AVCODEC_FRAME_PTS ++ this->av_frame->pts = this->tagged_pts; ++#endif + this->pts = 0; + } + +@@ -2207,9 +2247,11 @@ + img->top_field_first = this->av_frame->top_field_first; + + /* get back reordered pts */ +- img->pts = ff_untag_pts (this, this->av_frame->reordered_opaque); +- this->av_frame->reordered_opaque = 0; ++ img->pts = ff_untag_pts (this, this->av_frame); ++ this->tagged_pts = 0; ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE + this->context->reordered_opaque = 0; ++#endif + + if (this->av_frame->repeat_pict) + img->duration = this->video_step * 3 / 2; +@@ -2330,9 +2372,14 @@ + } + + if (this->size == 0) { ++ this->tagged_pts = ff_tag_pts (this, this->pts); + /* take over pts when we are about to buffer a frame */ +- this->av_frame->reordered_opaque = ff_tag_pts(this, this->pts); +- this->context->reordered_opaque = ff_tag_pts(this, this->pts); ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE ++ this->av_frame->reordered_opaque = this->context->reordered_opaque = this->tagged_pts; ++#endif ++#ifdef XFF_AVCODEC_FRAME_PTS ++ this->av_frame->pts = this->tagged_pts; ++#endif + this->pts = 0; + } + +@@ -2405,7 +2452,10 @@ + need_unref = 1; + #endif + /* reset consumed pts value */ +- this->context->reordered_opaque = ff_tag_pts(this, 0); ++ this->tagged_pts = ff_tag_pts (this, 0); ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE ++ this->context->reordered_opaque = this->tagged_pts; ++#endif + + if (err) { + +@@ -2439,10 +2489,14 @@ + ff_check_bufsize(this, this->size); + memmove (this->buf, &chunk_buf[offset], this->size); + chunk_buf = this->buf; +- + /* take over pts for next access unit */ +- this->av_frame->reordered_opaque = ff_tag_pts(this, this->pts); +- this->context->reordered_opaque = ff_tag_pts(this, this->pts); ++ this->tagged_pts = ff_tag_pts (this, this->pts); ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE ++ this->av_frame->reordered_opaque = this->context->reordered_opaque = this->tagged_pts; ++#endif ++#ifdef XFF_AVCODEC_FRAME_PTS ++ this->av_frame->pts = this->tagged_pts; ++#endif + this->pts = 0; + } + } +@@ -2559,8 +2613,7 @@ + ff_convert_frame(this, img, this->av_frame); + } + +- img->pts = ff_untag_pts(this, this->av_frame->reordered_opaque); +- this->av_frame->reordered_opaque = 0; ++ img->pts = ff_untag_pts(this, this->av_frame); + + /* workaround for weird 120fps streams */ + if( video_step_to_use == 750 ) { +@@ -2600,8 +2653,7 @@ + this->output_format, + VO_BOTH_FIELDS|this->frame_flags); + /* set PTS to allow early syncing */ +- img->pts = ff_untag_pts(this, this->av_frame->reordered_opaque); +- this->av_frame->reordered_opaque = 0; ++ img->pts = ff_untag_pts(this, this->av_frame); + + img->duration = video_step_to_use; + +@@ -2783,7 +2835,7 @@ + ff_convert_frame (this, img, this->av_frame2); + } + +- img->pts = ff_untag_pts (this, this->av_frame2->reordered_opaque); ++ img->pts = ff_untag_pts (this, this->av_frame2); + + if (video_step_to_use == 750) + video_step_to_use = 0; +@@ -2903,7 +2955,9 @@ + if (this->decoder_ok) { + + pthread_mutex_lock(&ffmpeg_lock); +- avcodec_close (this->context); ++ _x_freep (&this->context->extradata); ++ this->context->extradata_size = 0; ++ XFF_FREE_CONTEXT (this->context); + pthread_mutex_unlock(&ffmpeg_lock); + + #ifdef ENABLE_DIRECT_RENDERING +@@ -2912,16 +2966,15 @@ + + this->stream->video_out->close(this->stream->video_out, this->stream); + this->decoder_ok = 0; ++ } else if (this->context) { ++ _x_freep (&this->context->extradata); ++ this->context->extradata_size = 0; ++ XFF_FREE_CONTEXT (this->context); + } + + if (this->slice_offset_table) + free (this->slice_offset_table); + +- if (this->context) { +- _x_freep (&this->context->extradata); +- this->context->extradata_size = 0; +- XFF_FREE_CONTEXT (this->context); +- } + + #if XFF_VIDEO > 1 + XFF_PACKET_UNREF (this->avpkt); +diff -r d1954d852980 -r 1e7b18400886 src/combined/ffmpeg/ffmpeg_compat.h +--- a/src/combined/ffmpeg/ffmpeg_compat.h Mon Apr 08 13:25:10 2024 +0200 ++++ b/src/combined/ffmpeg/ffmpeg_compat.h Mon May 06 21:55:55 2024 +0200 +@@ -54,9 +54,16 @@ + #endif + + /* reordered_opaque appeared in libavcodec 51.68.0 */ +-#define XFF_AVCODEC_REORDERED_OPAQUE +-#if LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(51,68,0) +-# undef XFF_AVCODEC_REORDERED_OPAQUE ++#if LIBAVCODEC_VERSION_INT >= XFF_INT_VERSION(51,68,0) && LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(60,0,0) ++# define XFF_AVCODEC_REORDERED_OPAQUE ++#else ++# undef XFF_AVCODEC_REORDERED_OPAQUE ++#endif ++ ++#if LIBAVCODEC_VERSION_INT >= XFF_INT_VERSION(58,33,100) ++# define XFF_AVCODEC_FRAME_PTS ++#else ++# undef XFF_AVCODEC_FRAME_PTS + #endif + + /* colorspace and color_range were added before 52.29.0 */ +@@ -210,9 +217,11 @@ + #endif + + #if LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(55,63,100) +-# define XFF_FREE_CONTEXT(pp) do {av_free(pp); pp = NULL;} while (0) ++# define XFF_FREE_CONTEXT(pp) do {if (pp) avcodec_close (pp); av_free (pp); pp = NULL;} while (0) ++#elif LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(58,33,100) ++# define XFF_FREE_CONTEXT(pp) do {if (pp) avcodec_close (pp); avcodec_free_context (&(pp));} while (0) + #else +-# define XFF_FREE_CONTEXT(pp) avcodec_free_context(&(pp)) ++# define XFF_FREE_CONTEXT(pp) avcodec_free_context (&(pp)) + #endif + + #if LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(54,59,100) +@@ -303,4 +312,3 @@ + #endif /* defined(LIBAVCODEC_VERSION_INT) */ + + #endif /* XINE_AVCODEC_COMPAT_H */ +- +diff -r d1954d852980 -r 1e7b18400886 src/dxr3/ffmpeg_encoder.c +--- a/src/dxr3/ffmpeg_encoder.c Mon Apr 08 13:25:10 2024 +0200 ++++ b/src/dxr3/ffmpeg_encoder.c Mon May 06 21:55:55 2024 +0200 +@@ -127,10 +127,8 @@ + unsigned char use_quantizer; + + if (this->context) { +- avcodec_close(this->context); +- free(this->context); ++ XFF_FREE_CONTEXT (this->context); + free(this->picture); +- this->context = NULL; + this->picture = NULL; + } + +@@ -344,10 +342,8 @@ + #if XFF_ENCVIDEO > 1 + XFF_PACKET_UNREF (this->pkt); + #endif +- avcodec_close(this->context); + XFF_FREE_CONTEXT (this->context); + free(this->picture); +- this->context = NULL; + this->picture = NULL; + } + return 1; diff --git a/srcpkgs/xine-lib/patches/ffmpeg7-5.patch b/srcpkgs/xine-lib/patches/ffmpeg7-5.patch new file mode 100644 index 00000000000000..136750404be2db --- /dev/null +++ b/srcpkgs/xine-lib/patches/ffmpeg7-5.patch @@ -0,0 +1,318 @@ +# HG changeset patch +# User Torsten Jager +# Date 1715160885 -7200 +# Wed May 08 11:34:45 2024 +0200 +# Node ID 73b833e7fe356cd2d9490dda4ebc9bfe16fce958 +# Parent 1e7b184008860c8be2289c3cefd9dee57f06193a +ffmpeg compatibility update 2. + +diff -r 1e7b18400886 -r 73b833e7fe35 src/combined/ffmpeg/ff_audio_decoder.c +--- a/src/combined/ffmpeg/ff_audio_decoder.c Mon May 06 21:55:55 2024 +0200 ++++ b/src/combined/ffmpeg/ff_audio_decoder.c Wed May 08 11:34:45 2024 +0200 +@@ -1393,6 +1393,9 @@ + XFF_FREE_FRAME (this->av_frame); + } + #endif ++#if 1 ++ avcodec_flush_buffers (this->context); ++#else + pthread_mutex_lock (&ffmpeg_lock); + { + uint8_t *ed = this->context->extradata; +@@ -1410,6 +1413,7 @@ + if (XFF_AVCODEC_OPEN (this->context, this->codec) >= 0) + this->decoder_ok = 1; + pthread_mutex_unlock (&ffmpeg_lock); ++#endif + } + + ff_audio_reset_parser(this); +diff -r 1e7b18400886 -r 73b833e7fe35 src/combined/ffmpeg/ff_video_decoder.c +--- a/src/combined/ffmpeg/ff_video_decoder.c Mon May 06 21:55:55 2024 +0200 ++++ b/src/combined/ffmpeg/ff_video_decoder.c Wed May 08 11:34:45 2024 +0200 +@@ -89,6 +89,11 @@ + # define ENABLE_EMMS + #endif + ++/* ++#undef XFF_AVCODEC_SLICE_TABLE ++#define XFF_AVCODEC_SLICE_TABLE 1 ++*/ ++ + #define VIDEOBUFSIZE (128*1024) + #define SLICE_BUFFER_SIZE (1194*1024) + +@@ -148,11 +153,11 @@ + int bufsize; + int size; + int skipframes; +- ++#if XFF_AVCODEC_SLICE_TABLE == 1 + int *slice_offset_table; + int slice_offset_size; + int slice_offset_pos; +- ++#endif + AVFrame *av_frame; + AVFrame *av_frame2; + AVCodecContext *context; +@@ -238,6 +243,13 @@ + #if XFF_VIDEO > 1 + XFF_PACKET_DECL (avpkt); + #endif ++ ++#if XFF_AVCODEC_SLICE_TABLE == 2 ++ uint8_t *temp_buf; ++ uint32_t temp_size; ++ int slice_num; ++ uint8_t slice_table[1 + 256 * 8]; ++#endif + }; + + /* import color matrix names */ +@@ -1783,10 +1795,9 @@ + this->size += buf->size; + + if (buf->decoder_flags & BUF_FLAG_FRAME_END) { +- int codec_type; ++ uint32_t codec_type = buf->type & 0xFFFF0000; + + lprintf ("header complete\n"); +- codec_type = buf->type & 0xFFFF0000; + + if (buf->decoder_flags & BUF_FLAG_STDHEADER) { + +@@ -1912,33 +1923,44 @@ + #endif + } + else if (buf->decoder_info[1] == BUF_SPECIAL_RV_CHUNK_TABLE) { +- /* o dear. Multiple decoding threads use individual contexts. +- av_decode_video2 () does only copy the _pointer_ to the offsets, +- not the offsets themselves. So we must not overwrite anything +- that another thread has not yet read. */ +- int i, l, total; +- +- lprintf("BUF_SPECIAL_RV_CHUNK_TABLE\n"); +- l = buf->decoder_info[2] + 1; +- +- total = l * this->class->thread_count; +- if (total < SLICE_OFFSET_SIZE) +- total = SLICE_OFFSET_SIZE; +- if (total > this->slice_offset_size) { +- this->slice_offset_table = realloc (this->slice_offset_table, total * sizeof (int)); +- this->slice_offset_size = total; +- } +- +- if (this->slice_offset_pos + l > this->slice_offset_size) +- this->slice_offset_pos = 0; +- this->context->slice_offset = this->slice_offset_table + this->slice_offset_pos; +- this->context->slice_count = l; +- +- lprintf ("slice_count=%d\n", l); +- for (i = 0; i < l; i++) { +- this->slice_offset_table[this->slice_offset_pos++] = +- ((uint32_t *)buf->decoder_info_ptr[2])[(2 * i) + 1]; +- lprintf("slice_offset[%d]=%d\n", i, this->context->slice_offset[i]); ++ { ++#if XFF_AVCODEC_SLICE_TABLE == 1 ++ /* o dear. Multiple decoding threads use individual contexts. ++ * av_decode_video2 () does only copy the _pointer_ to the offsets, ++ * not the offsets themselves. So we must not overwrite anything ++ * that another thread has not yet read. */ ++ int i, l, total; ++ ++ lprintf("BUF_SPECIAL_RV_CHUNK_TABLE\n"); ++ l = buf->decoder_info[2] + 1; ++ ++ total = l * this->class->thread_count; ++ if (total < SLICE_OFFSET_SIZE) ++ total = SLICE_OFFSET_SIZE; ++ if (total > this->slice_offset_size) { ++ this->slice_offset_table = realloc (this->slice_offset_table, total * sizeof (int)); ++ this->slice_offset_size = total; ++ } ++ ++ if (this->slice_offset_pos + l > this->slice_offset_size) ++ this->slice_offset_pos = 0; ++ this->context->slice_offset = this->slice_offset_table + this->slice_offset_pos; ++ this->context->slice_count = l; ++ ++ lprintf ("slice_count=%d\n", l); ++ for (i = 0; i < l; i++) { ++ this->slice_offset_table[this->slice_offset_pos++] = ++ ((uint32_t *)buf->decoder_info_ptr[2])[(2 * i) + 1]; ++ lprintf("slice_offset[%d]=%d\n", i, this->context->slice_offset[i]); ++ } ++#elif XFF_AVCODEC_SLICE_TABLE == 2 ++ /* (count-1):1, 1:4, (offs[0]):4, 1:4, (offs[1]:4, ... just in front of the frame bitstream. ++ * reverse engineered from ffmpeg/libavcodec/rv34.c. they seem to expect no ++ * external use of rv decoders, and did not document this. */ ++ this->slice_table[0] = buf->decoder_info[2]; ++ this->slice_num = this->slice_table[0] + 1; ++ memcpy (this->slice_table + 1, buf->decoder_info_ptr[2], 8 * this->slice_num); ++#endif + } + } + } +@@ -2004,6 +2026,7 @@ + + static int decode_video_wrapper (ff_video_decoder_t *this, + AVFrame *av_frame, int *err, void *buf, size_t buf_size) { ++ uint32_t tsize = 0; + int len; + + #if ENABLE_VAAPI +@@ -2013,9 +2036,32 @@ + } + #endif /* ENABLE_VAAPI */ + ++#if XFF_AVCODEC_SLICE_TABLE == 2 ++ if ((this->slice_num > 0) && buf) { ++ uint32_t nsize; ++ tsize = 1 + this->slice_num * 8; ++ nsize = tsize + buf_size + AV_INPUT_BUFFER_PADDING_SIZE; ++ if (this->temp_size < nsize) { ++ nsize = nsize * 3 / 2; ++ free (this->temp_buf); ++ this->temp_buf = malloc (nsize); ++ if (!this->temp_buf) ++ nsize = 0; ++ this->temp_size = nsize; ++ nsize = tsize + buf_size + AV_INPUT_BUFFER_PADDING_SIZE; ++ } ++ if (this->temp_size >= nsize) { ++ memcpy (this->temp_buf, this->slice_table, tsize); ++ memcpy (this->temp_buf + tsize, buf, buf_size + AV_INPUT_BUFFER_PADDING_SIZE); ++ buf = this->temp_buf; ++ } ++ this->slice_num = 0; ++ } ++#endif ++ + #if XFF_VIDEO > 1 + this->avpkt->data = buf; +- this->avpkt->size = buf_size; ++ this->avpkt->size = buf_size + tsize; + this->avpkt->flags = AV_PKT_FLAG_KEY; + # ifdef XFF_AVCODEC_FRAME_PTS + this->avpkt->pts = this->tagged_pts; +@@ -2486,7 +2532,6 @@ + this->size -= len; + + if (this->size > 0) { +- ff_check_bufsize(this, this->size); + memmove (this->buf, &chunk_buf[offset], this->size); + chunk_buf = this->buf; + /* take over pts for next access unit */ +@@ -2615,8 +2660,8 @@ + + img->pts = ff_untag_pts(this, this->av_frame); + +- /* workaround for weird 120fps streams */ +- if( video_step_to_use == 750 ) { ++ /* workaround for weird 120fps streams, as well as some rv20 with frame duration 3pts. */ ++ if (video_step_to_use <= 750) { + /* fallback to the VIDEO_PTS_MODE */ + video_step_to_use = 0; + } +@@ -2837,7 +2882,7 @@ + + img->pts = ff_untag_pts (this, this->av_frame2); + +- if (video_step_to_use == 750) ++ if (video_step_to_use <= 750) + video_step_to_use = 0; + img->duration = this->av_frame2->repeat_pict ? video_step_to_use * 3 / 2 : video_step_to_use; + img->progressive_frame = !this->av_frame2->interlaced_frame; +@@ -2941,6 +2986,9 @@ + mpeg_parser_reset(this->mpeg_parser); + + /* this->pts_tag_pass = 0; */ ++#if XFF_AVCODEC_SLICE_TABLE == 2 ++ this->slice_num = 0; ++#endif + } + + static void ff_dispose (video_decoder_t *this_gen) { +@@ -2953,12 +3001,15 @@ + rgb2yuy2_free (this->rgb2yuy2); + + if (this->decoder_ok) { ++ uint8_t *ed; + + pthread_mutex_lock(&ffmpeg_lock); +- _x_freep (&this->context->extradata); ++ ed = this->context->extradata; ++ this->context->extradata = NULL; + this->context->extradata_size = 0; + XFF_FREE_CONTEXT (this->context); + pthread_mutex_unlock(&ffmpeg_lock); ++ _x_freep (&ed); + + #ifdef ENABLE_DIRECT_RENDERING + ff_free_dr1_frames (this, 1); +@@ -2972,9 +3023,11 @@ + XFF_FREE_CONTEXT (this->context); + } + +- if (this->slice_offset_table) +- free (this->slice_offset_table); +- ++#if XFF_AVCODEC_SLICE_TABLE == 1 ++ free (this->slice_offset_table); ++#elif XFF_AVCODEC_SLICE_TABLE == 2 ++ free (this->temp_buf); ++#endif + + #if XFF_VIDEO > 1 + XFF_PACKET_UNREF (this->avpkt); +@@ -3062,21 +3115,25 @@ + this->decoder_ok = 0; + this->aspect_ratio = 0; + this->pts_tag_pass = 0; +-#ifdef HAVE_POSTPROC ++# ifdef HAVE_POSTPROC + this->pp_quality = 0; + this->our_context = NULL; + this->our_mode = NULL; +-#endif ++# endif + this->mpeg_parser = NULL; + this->set_stream_info = 0; + this->rgb2yuy2 = NULL; +-#ifdef ENABLE_VAAPI ++# ifdef ENABLE_VAAPI + this->accel = NULL; + this->accel_img = NULL; +-#endif +-#if XFF_VIDEO == 3 ++# endif ++# if XFF_VIDEO == 3 + this->flush_packet_sent = 0; +-#endif ++# endif ++# if XFF_AVCODEC_SLICE_TABLE == 2 ++ this->temp_size = 0; ++ this->temp_buf = NULL; ++# endif + #endif + + this->video_decoder.decode_data = ff_decode_data; +diff -r 1e7b18400886 -r 73b833e7fe35 src/combined/ffmpeg/ffmpeg_compat.h +--- a/src/combined/ffmpeg/ffmpeg_compat.h Mon May 06 21:55:55 2024 +0200 ++++ b/src/combined/ffmpeg/ffmpeg_compat.h Wed May 08 11:34:45 2024 +0200 +@@ -139,6 +139,14 @@ + # define XFF_PALETTE 3 + #endif + ++#if LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(59,42,100) ++/* AVCodecContext.slice_{offset,count} */ ++# define XFF_AVCODEC_SLICE_TABLE 1 ++#else ++/* inline offset table before the frame. */ ++# define XFF_AVCODEC_SLICE_TABLE 2 ++#endif ++ + #if LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(59,0,100) /** << revise this */ + # define XFF_VAAPI 1 /** << libavcodec/vaapi.h */ + #else diff --git a/srcpkgs/xine-lib/patches/ffmpeg8-1.patch b/srcpkgs/xine-lib/patches/ffmpeg8-1.patch new file mode 100644 index 00000000000000..1e4f9156c59dc4 --- /dev/null +++ b/srcpkgs/xine-lib/patches/ffmpeg8-1.patch @@ -0,0 +1,114 @@ +Submitted By: Joe Locash +Date: 2025-11-18 +Initial Package Version: 1.2.13 +Upstream Status: Applied +Origin: Upstream commits 9bb397 and a8fffd +Description: Fixes building xine-lib against ffmpeg-8. + + +diff -Nuarp xine-lib-1.2.13.orig/src/combined/ffmpeg/ffmpeg_compat.h xine-lib-1.2.13/src/combined/ffmpeg/ffmpeg_compat.h +--- xine-lib-1.2.13.orig/src/combined/ffmpeg/ffmpeg_compat.h 2025-11-18 13:24:12.824655934 -0500 ++++ xine-lib-1.2.13/src/combined/ffmpeg/ffmpeg_compat.h 2025-11-18 12:59:41.956696804 -0500 +@@ -319,4 +319,20 @@ + # error avcodec.h must be included first ! + #endif /* defined(LIBAVCODEC_VERSION_INT) */ + ++#if LIBAVUTIL_VERSION_INT >= XFF_INT_VERSION(58,7,0) ++# define XFF_FRAME_IS_INTERLACED(_frame) ((_frame)->flags & AV_FRAME_FLAG_INTERLACED) ++# define XFF_FRAME_IS_TOP_FIELD_FIRST(_frame) ((_frame)->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ++# define XFF_FRAME_IS_KEY(_frame) ((_frame)->flags & AV_FRAME_FLAG_KEY) ++#else ++# define XFF_FRAME_IS_INTERLACED(_frame) ((_frame)->interlaced_frame) ++# define XFF_FRAME_IS_TOP_FIELD_FIRST(_frame) ((_frame)->top_field_first) ++# define XFF_FRAME_IS_KEY(_frame) ((_frame)->key_frame) ++#endif ++ ++#if LIBAVCODEC_VERSION_INT >= XFF_INT_VERSION(60,0,0) ++# define XFF_FRAME_RATE 2 /* AV_CODEC_PROP_FIELDS */ ++#else ++# define XFF_FRAME_RATE 1 /* AVCodecContext.ticks_per_frame */ ++#endif ++ + #endif /* XINE_AVCODEC_COMPAT_H */ +diff -Nuarp xine-lib-1.2.13.orig/src/combined/ffmpeg/ff_video_decoder.c xine-lib-1.2.13/src/combined/ffmpeg/ff_video_decoder.c +--- xine-lib-1.2.13.orig/src/combined/ffmpeg/ff_video_decoder.c 2025-11-18 13:24:12.825127146 -0500 ++++ xine-lib-1.2.13/src/combined/ffmpeg/ff_video_decoder.c 2025-11-18 13:07:52.717841093 -0500 +@@ -60,6 +60,10 @@ + + #include "ffmpeg_compat.h" + ++#if XFF_FRAME_RATE == 2 ++# include ++#endif ++ + #if LIBAVCODEC_VERSION_INT >= XFF_INT_VERSION(59,0,100) + # undef HAVE_POSTPROC + #endif +@@ -2289,8 +2293,8 @@ static void ff_handle_mpeg12_buffer (ff_ + } + + /* transfer some more frame settings for deinterlacing */ +- img->progressive_frame = !this->av_frame->interlaced_frame; +- img->top_field_first = this->av_frame->top_field_first; ++ img->progressive_frame = !XFF_FRAME_IS_INTERLACED (this->av_frame); ++ img->top_field_first = !!XFF_FRAME_IS_TOP_FIELD_FIRST (this->av_frame); + + /* get back reordered pts */ + img->pts = ff_untag_pts (this, this->av_frame); +@@ -2370,20 +2374,29 @@ static void ff_postprocess (ff_video_dec + + static int ff_video_step_get (ff_video_decoder_t *this) { + /* use externally provided video_step or fall back to stream's time_base otherwise */ +- int step = this->video_step; ++ int step = this->video_step, num_fields; + if (step || !this->context->time_base.den) + return step; + ++#if XFF_FRAME_RATE == 1 ++ num_fields = this->context->ticks_per_frame; ++#else /* XFF_FRAME_RATE == 2 */ ++ { ++ const AVCodecDescriptor *desc = avcodec_descriptor_get (this->context->codec_id); ++ if (desc) ++ num_fields = (desc->props & AV_CODEC_PROP_FIELDS) ? 2 : 1; ++ else ++ num_fields = 2; ++ } ++#endif + /* good: 2 * 1001 / 48000. */ +- step = (int64_t)90000 * this->context->ticks_per_frame +- * this->context->time_base.num / this->context->time_base.den; ++ step = (int64_t)90000 * num_fields * this->context->time_base.num / this->context->time_base.den; + if (step >= 90) + return step; + + /* bad: 2 * 1 / 60000. seen this once from broken h.264 video usability info (VUI). + * VAAPI seems to apply a similar HACK.*/ +- step = (int64_t)90000000 * this->context->ticks_per_frame +- * this->context->time_base.num / this->context->time_base.den; ++ step = (int64_t)90000000 * num_fields * this->context->time_base.num / this->context->time_base.den; + return step; + } + +@@ -2675,8 +2688,8 @@ static void ff_handle_buffer (ff_video_d + img->duration = video_step_to_use; + + /* transfer some more frame settings for deinterlacing */ +- img->progressive_frame = !this->av_frame->interlaced_frame; +- img->top_field_first = this->av_frame->top_field_first; ++ img->progressive_frame = !XFF_FRAME_IS_INTERLACED (this->av_frame); ++ img->top_field_first = !!XFF_FRAME_IS_TOP_FIELD_FIRST (this->av_frame); + + this->skipframes = img->draw(img, this->stream); + this->state = STATE_FRAME_SENT; +@@ -2885,8 +2898,8 @@ static void ff_flush_internal (ff_video_ + if (video_step_to_use <= 750) + video_step_to_use = 0; + img->duration = this->av_frame2->repeat_pict ? video_step_to_use * 3 / 2 : video_step_to_use; +- img->progressive_frame = !this->av_frame2->interlaced_frame; +- img->top_field_first = this->av_frame2->top_field_first; ++ img->progressive_frame = !XFF_FRAME_IS_INTERLACED (this->av_frame2); ++ img->top_field_first = !!XFF_FRAME_IS_TOP_FIELD_FIRST (this->av_frame2); + + this->skipframes = img->draw (img, this->stream); + if (free_img) diff --git a/srcpkgs/xine-lib/template b/srcpkgs/xine-lib/template index e0fabcab9a4faf..0d0abb69d026ce 100644 --- a/srcpkgs/xine-lib/template +++ b/srcpkgs/xine-lib/template @@ -1,14 +1,14 @@ # Template file for 'xine-lib' pkgname=xine-lib version=1.2.13 -revision=2 +revision=3 build_style=gnu-configure configure_args="--disable-vcd --disable-gnomevfs --without-esound --disable-dxr3 --disable-oss" hostmakedepends="automake gettext-devel libtool pkg-config perl" makedepends=" zlib-devel alsa-lib-devel libxcb-devel libSM-devel libXext-devel libXv-devel - libXvMC-devel liba52-devel libmad-devel ffmpeg6-devel pulseaudio-devel + libXvMC-devel liba52-devel libmad-devel ffmpeg-devel pulseaudio-devel jack-devel samba-devel libflac-devel libmodplug-devel libmpcdec-devel speex-devel libtheora-devel libvorbis-devel libdca-devel faad2-devel libcdio-devel libbluray-devel aalib-devel libcaca-devel libXinerama-devel From bc1c2f2d33febbc7c935a3b140cf9712a78f8a21 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:48 -0500 Subject: [PATCH 060/115] xpra: revbump for ffmpeg9 --- srcpkgs/xpra/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/xpra/template b/srcpkgs/xpra/template index efed2d24d1b6a1..002869f195ad09 100644 --- a/srcpkgs/xpra/template +++ b/srcpkgs/xpra/template @@ -1,14 +1,14 @@ # Template file for 'xpra' pkgname=xpra version=6.4.4 -revision=1 +revision=2 build_style=python3-module make_build_args="--without-cuda_kernels --without-cuda_rebuild $(vopt_if docs "--with-docs")" make_install_args="${make_build_args}" hostmakedepends="pkg-config python3-setuptools python3-Cython $(vopt_if docs pandoc)" -makedepends="ffmpeg6-devel libXcomposite-devel libXrandr-devel libXtst-devel +makedepends="ffmpeg-devel libXcomposite-devel libXrandr-devel libXtst-devel libvpx-devel libwebp-devel libxkbfile-devel python3-gobject-devel x264-devel gtk+3-devel pam-devel libXres-devel liblz4-devel libavif-devel procps-ng-devel xxHash-devel" From a86213b8cc9d7eb87dcdbf0d640e0de7a97d7364 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 061/115] ffmpegthumbnailer: update to 2.2.4 --- srcpkgs/ffmpegthumbnailer/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/ffmpegthumbnailer/template b/srcpkgs/ffmpegthumbnailer/template index 05698290ff3e6e..b3f8f2f47bf035 100644 --- a/srcpkgs/ffmpegthumbnailer/template +++ b/srcpkgs/ffmpegthumbnailer/template @@ -1,17 +1,17 @@ # Template file for 'ffmpegthumbnailer' pkgname=ffmpegthumbnailer -version=2.2.3 +version=2.2.4 revision=1 build_style=cmake hostmakedepends="pkg-config" -makedepends="libpng-devel libjpeg-turbo-devel ffmpeg6-devel" +makedepends="libpng-devel libjpeg-turbo-devel ffmpeg-devel" depends="ffmpeg" short_desc="Lightweight video thumbnailer" maintainer="Orphaned " license="GPL-2.0-or-later" homepage="https://github.com/dirkvdb" -distfiles="${homepage}/${pkgname}/archive/refs/tags/${version}.tar.gz" -checksum=8c9b9057c6cc8bce9d11701af224c8139c940f734c439a595525e073b09d19b8 +distfiles="${homepage}/${pkgname}/archive/refs/tags/v${version}.tar.gz" +checksum=2d5a667ab13e0312127e188388d61afc54735f6cb9da146b09eb65c6fdad7d45 post_install() { vinstall dist/ffmpegthumbnailer.thumbnailer 644 usr/share/thumbnailers From 72eabd41c14a4305c184bf9374a37cb15faa122e Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 062/115] chromaprint: update to 1.6.0 --- srcpkgs/chromaprint/patches/ffmpeg5.patch | 569 ---------------------- srcpkgs/chromaprint/template | 11 +- 2 files changed, 6 insertions(+), 574 deletions(-) delete mode 100644 srcpkgs/chromaprint/patches/ffmpeg5.patch diff --git a/srcpkgs/chromaprint/patches/ffmpeg5.patch b/srcpkgs/chromaprint/patches/ffmpeg5.patch deleted file mode 100644 index a9fd307a23c8a4..00000000000000 --- a/srcpkgs/chromaprint/patches/ffmpeg5.patch +++ /dev/null @@ -1,569 +0,0 @@ -From 8ccad6937177b1b92e40ab8f4447ea27bac009a7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= -Date: Fri, 4 Nov 2022 21:47:38 +0100 -Subject: [PATCH] Use FFmpeg 5.x (#120) - -* Use FFmpeg 5.1.2 for CI builds - -* Build on Ubuntu 20.04 - -* Upgrade code to FFmpeg 5.x APIs - -* Only set FFmpeg include dirs if building tools - -* No longer needed - -* Use ubuntu 20.04 ---- - .github/workflows/build.yml | 6 +- - CMakeLists.txt | 16 -- - package/build.sh | 4 +- - src/audio/ffmpeg_audio_processor.h | 2 - - src/audio/ffmpeg_audio_processor_avresample.h | 72 ------- - src/audio/ffmpeg_audio_processor_swresample.h | 18 +- - src/audio/ffmpeg_audio_reader.h | 197 +++++++++--------- - tests/CMakeLists.txt | 6 + - 8 files changed, 122 insertions(+), 199 deletions(-) - delete mode 100644 src/audio/ffmpeg_audio_processor_avresample.h - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f8d6a32..4da2405 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -84,9 +84,6 @@ find_package(FFmpeg) - if(FFMPEG_LIBRARIES) - cmake_push_check_state(RESET) - set(CMAKE_REQUIRED_LIBRARIES ${FFMPEG_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} -lm) -- check_function_exists(av_packet_unref HAVE_AV_PACKET_UNREF) -- check_function_exists(av_frame_alloc HAVE_AV_FRAME_ALLOC) -- check_function_exists(av_frame_free HAVE_AV_FRAME_FREE) - cmake_pop_check_state() - endif() - -@@ -163,14 +160,11 @@ message(STATUS "Using ${FFT_LIB} for FFT calculations") - if(NOT AUDIO_PROCESSOR_LIB) - if(FFMPEG_LIBSWRESAMPLE_FOUND) - set(AUDIO_PROCESSOR_LIB "swresample") -- elseif(FFMPEG_LIBAVRESAMPLE_FOUND) -- set(AUDIO_PROCESSOR_LIB "avresample") - endif() - endif() - - if(AUDIO_PROCESSOR_LIB STREQUAL "swresample") - if(FFMPEG_LIBSWRESAMPLE_FOUND) -- set(USE_AVRESAMPLE OFF) - set(USE_SWRESAMPLE ON) - set(AUDIO_PROCESSOR_LIBRARIES ${FFMPEG_LIBSWRESAMPLE_LIBRARIES}) - set(AUDIO_PROCESSOR_INCLUDE_DIRS ${FFMPEG_LIBSWRESAMPLE_INCLUDE_DIRS}) -@@ -178,16 +172,6 @@ if(AUDIO_PROCESSOR_LIB STREQUAL "swresample") - message(FATAL_ERROR "Selected ${AUDIO_PROCESSOR_LIB} for audio processing, but the library is not found") - endif() - message(STATUS "Using ${AUDIO_PROCESSOR_LIB} for audio conversion") --elseif(AUDIO_PROCESSOR_LIB STREQUAL "avresample") -- if(FFMPEG_LIBAVRESAMPLE_FOUND) -- set(USE_AVRESAMPLE ON) -- set(USE_SWRESAMPLE OFF) -- set(AUDIO_PROCESSOR_LIBRARIES ${FFMPEG_LIBAVRESAMPLE_LIBRARIES}) -- set(AUDIO_PROCESSOR_INCLUDE_DIRS ${FFMPEG_LIBAVRESAMPLE_INCLUDE_DIRS}) -- else() -- message(FATAL_ERROR "Selected ${AUDIO_PROCESSOR_LIB} for audio processing, but the library is not found") -- endif() -- message(STATUS "Using ${AUDIO_PROCESSOR_LIB} for audio conversion") - else() - message(STATUS "Building without audio conversion support, please install FFmpeg with libswresample") - endif() -diff --git a/package/build.sh b/package/build.sh -index da631ae..b41d36e 100755 ---- a/package/build.sh -+++ b/package/build.sh -@@ -7,8 +7,8 @@ set -eux - - BASE_DIR=$(cd $(dirname $0)/.. && pwd) - --FFMPEG_VERSION=4.4.1 --FFMPEG_BUILD_TAG=v4.4.1-1 -+FFMPEG_VERSION=5.1.2 -+FFMPEG_BUILD_TAG=v${FFMPEG_VERSION}-1 - - TMP_BUILD_DIR=$BASE_DIR/$(mktemp -d build.XXXXXXXX) - trap 'rm -rf $TMP_BUILD_DIR' EXIT -diff --git a/src/audio/ffmpeg_audio_processor.h b/src/audio/ffmpeg_audio_processor.h -index 7628fc7..39f4f6d 100644 ---- a/src/audio/ffmpeg_audio_processor.h -+++ b/src/audio/ffmpeg_audio_processor.h -@@ -10,8 +10,6 @@ - - #if defined(USE_SWRESAMPLE) - #include "audio/ffmpeg_audio_processor_swresample.h" --#elif defined(USE_AVRESAMPLE) --#include "audio/ffmpeg_audio_processor_avresample.h" - #else - #error "no audio processing library" - #endif -diff --git a/src/audio/ffmpeg_audio_processor_avresample.h b/src/audio/ffmpeg_audio_processor_avresample.h -deleted file mode 100644 -index bd85f92..0000000 ---- a/src/audio/ffmpeg_audio_processor_avresample.h -+++ /dev/null -@@ -1,72 +0,0 @@ --// Copyright (C) 2016 Lukas Lalinsky --// Distributed under the MIT license, see the LICENSE file for details. -- --#ifndef CHROMAPRINT_AUDIO_FFMPEG_AUDIO_PROCESSOR_AVRESAMPLE_H_ --#define CHROMAPRINT_AUDIO_FFMPEG_AUDIO_PROCESSOR_AVRESAMPLE_H_ -- --extern "C" { --#include --} -- --namespace chromaprint { -- --class FFmpegAudioProcessor { --public: -- FFmpegAudioProcessor() { -- m_resample_ctx = avresample_alloc_context(); -- } -- -- ~FFmpegAudioProcessor() { -- avresample_free(&m_resample_ctx); -- } -- -- void SetCompatibleMode() { -- av_opt_set_int(m_resample_ctx, "filter_size", 16, 0); -- av_opt_set_int(m_resample_ctx, "phase_shift", 8, 0); -- av_opt_set_int(m_resample_ctx, "linear_interp", 1, 0); -- av_opt_set_double(m_resample_ctx, "cutoff", 0.8, 0); -- } -- -- void SetInputChannelLayout(int64_t channel_layout) { -- av_opt_set_int(m_resample_ctx, "in_channel_layout", channel_layout, 0); -- } -- -- void SetInputSampleFormat(AVSampleFormat sample_format) { -- av_opt_set_int(m_resample_ctx, "in_sample_fmt", sample_format, 0); -- } -- -- void SetInputSampleRate(int sample_rate) { -- av_opt_set_int(m_resample_ctx, "in_sample_rate", sample_rate, 0); -- } -- -- void SetOutputChannelLayout(int64_t channel_layout) { -- av_opt_set_int(m_resample_ctx, "out_channel_layout", channel_layout, 0); -- } -- -- void SetOutputSampleFormat(AVSampleFormat sample_format) { -- av_opt_set_int(m_resample_ctx, "out_sample_fmt", sample_format, 0); -- } -- -- void SetOutputSampleRate(int sample_rate) { -- av_opt_set_int(m_resample_ctx, "out_sample_fmt", sample_rate, 0); -- } -- -- int Init() { -- return avresample_open(m_resample_ctx); -- } -- -- int Convert(uint8_t **out, int out_count, const uint8_t **in, int in_count) { -- return avresample_convert(m_resample_ctx, out, 0, out_count, (uint8_t **) in, 0, in_count); -- } -- -- int Flush(uint8_t **out, int out_count) { -- return avresample_read(m_resample_ctx, out, out_count); -- } -- --private: -- AVAudioResampleContext *m_resample_ctx = nullptr; --}; -- --}; // namespace chromaprint -- --#endif -diff --git a/src/audio/ffmpeg_audio_processor_swresample.h b/src/audio/ffmpeg_audio_processor_swresample.h -index b86266b..b1d4bea 100644 ---- a/src/audio/ffmpeg_audio_processor_swresample.h -+++ b/src/audio/ffmpeg_audio_processor_swresample.h -@@ -28,30 +28,28 @@ public: - av_opt_set_double(m_swr_ctx, "cutoff", 0.8, 0); - } - -- void SetInputChannelLayout(int64_t channel_layout) { -- av_opt_set_int(m_swr_ctx, "icl", channel_layout, 0); -- av_opt_set_int(m_swr_ctx, "ich", av_get_channel_layout_nb_channels(channel_layout), 0); -+ void SetInputChannelLayout(AVChannelLayout *channel_layout) { -+ av_opt_set_int(m_swr_ctx, "in_channel_layout", channel_layout->u.mask, 0); - } - - void SetInputSampleFormat(AVSampleFormat sample_format) { -- av_opt_set_int(m_swr_ctx, "isf", sample_format, 0); -+ av_opt_set_sample_fmt(m_swr_ctx, "in_sample_fmt", sample_format, 0); - } - - void SetInputSampleRate(int sample_rate) { -- av_opt_set_int(m_swr_ctx, "isr", sample_rate, 0); -+ av_opt_set_int(m_swr_ctx, "in_sample_rate", sample_rate, 0); - } - -- void SetOutputChannelLayout(int64_t channel_layout) { -- av_opt_set_int(m_swr_ctx, "ocl", channel_layout, 0); -- av_opt_set_int(m_swr_ctx, "och", av_get_channel_layout_nb_channels(channel_layout), 0); -+ void SetOutputChannelLayout(AVChannelLayout *channel_layout) { -+ av_opt_set_int(m_swr_ctx, "out_channel_layout", channel_layout->u.mask, 0); - } - - void SetOutputSampleFormat(AVSampleFormat sample_format) { -- av_opt_set_int(m_swr_ctx, "osf", sample_format, 0); -+ av_opt_set_sample_fmt(m_swr_ctx, "out_sample_fmt", sample_format, 0); - } - - void SetOutputSampleRate(int sample_rate) { -- av_opt_set_int(m_swr_ctx, "osr", sample_rate, 0); -+ av_opt_set_int(m_swr_ctx, "out_sample_rate", sample_rate, 0); - } - - int Init() { -diff --git a/src/audio/ffmpeg_audio_reader.h b/src/audio/ffmpeg_audio_reader.h -index 5550164..1c6b346 100644 ---- a/src/audio/ffmpeg_audio_reader.h -+++ b/src/audio/ffmpeg_audio_reader.h -@@ -62,7 +62,7 @@ public: - bool Read(const int16_t **data, size_t *size); - - bool IsOpen() const { return m_opened; } -- bool IsFinished() const { return m_finished && !m_got_frame; } -+ bool IsFinished() const { return !m_has_more_packets && !m_has_more_frames; } - - std::string GetError() const { return m_error; } - int GetErrorCode() const { return m_error_code; } -@@ -74,20 +74,19 @@ private: - uint8_t *m_convert_buffer[1] = { nullptr }; - int m_convert_buffer_nb_samples = 0; - -- AVInputFormat *m_input_fmt = nullptr; -+ const AVInputFormat *m_input_fmt = nullptr; - AVDictionary *m_input_opts = nullptr; - - AVFormatContext *m_format_ctx = nullptr; - AVCodecContext *m_codec_ctx = nullptr; -- AVFrame *m_frame = nullptr; - int m_stream_index = -1; - std::string m_error; - int m_error_code = 0; -- bool m_finished = false; - bool m_opened = false; -- int m_got_frame = 0; -- AVPacket m_packet; -- AVPacket m_packet0; -+ bool m_has_more_packets = true; -+ bool m_has_more_frames = true; -+ AVPacket *m_packet = nullptr; -+ AVFrame *m_frame = nullptr; - - int m_output_sample_rate = 0; - int m_output_channels = 0; -@@ -98,19 +97,12 @@ private: - - inline FFmpegAudioReader::FFmpegAudioReader() { - av_log_set_level(AV_LOG_QUIET); -- -- av_init_packet(&m_packet); -- m_packet.data = nullptr; -- m_packet.size = 0; -- -- m_packet0 = m_packet; - } - - inline FFmpegAudioReader::~FFmpegAudioReader() { - Close(); - av_dict_free(&m_input_opts); - av_freep(&m_convert_buffer[0]); -- av_packet_unref(&m_packet0); - } - - inline bool FFmpegAudioReader::SetInputFormat(const char *name) { -@@ -135,11 +127,10 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) { - - Close(); - -- av_init_packet(&m_packet); -- m_packet.data = nullptr; -- m_packet.size = 0; -- -- m_packet0 = m_packet; -+ m_packet = av_packet_alloc(); -+ if (!m_packet) { -+ return false; -+ } - - ret = avformat_open_input(&m_format_ctx, file_name.c_str(), m_input_fmt, &m_input_opts); - if (ret < 0) { -@@ -153,26 +144,31 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) { - return false; - } - -- AVCodec *codec; -+ const AVCodec *codec; - ret = av_find_best_stream(m_format_ctx, AVMEDIA_TYPE_AUDIO, -1, -1, &codec, 0); - if (ret < 0) { - SetError("Could not find any audio stream in the file", ret); - return false; - } - m_stream_index = ret; -+ auto stream = m_format_ctx->streams[m_stream_index]; - -- m_codec_ctx = m_format_ctx->streams[m_stream_index]->codec; -+ m_codec_ctx = avcodec_alloc_context3(codec); - m_codec_ctx->request_sample_fmt = AV_SAMPLE_FMT_S16; - -+ ret = avcodec_parameters_to_context(m_codec_ctx, stream->codecpar); -+ if (ret < 0) { -+ SetError("Could not copy the stream parameters", ret); -+ return false; -+ } -+ - ret = avcodec_open2(m_codec_ctx, codec, nullptr); - if (ret < 0) { - SetError("Could not open the codec", ret); - return false; - } - -- if (!m_codec_ctx->channel_layout) { -- m_codec_ctx->channel_layout = av_get_default_channel_layout(m_codec_ctx->channels); -- } -+ av_dump_format(m_format_ctx, 0, "foo", 0); - - m_frame = av_frame_alloc(); - if (!m_frame) { -@@ -183,19 +179,23 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) { - m_output_sample_rate = m_codec_ctx->sample_rate; - } - -- if (!m_output_channels) { -- m_output_channels = m_codec_ctx->channels; -+ AVChannelLayout output_channel_layout; -+ if (m_output_channels) { -+ av_channel_layout_default(&output_channel_layout, m_output_channels); -+ } else { -+ m_output_channels = m_codec_ctx->ch_layout.nb_channels; -+ av_channel_layout_default(&output_channel_layout, m_output_channels); - } - -- if (m_codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16 || m_codec_ctx->channels != m_output_channels || m_codec_ctx->sample_rate != m_output_sample_rate) { -+ if (m_codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16 || m_codec_ctx->ch_layout.nb_channels != m_output_channels || m_codec_ctx->sample_rate != m_output_sample_rate) { - m_converter.reset(new FFmpegAudioProcessor()); - m_converter->SetCompatibleMode(); - m_converter->SetInputSampleFormat(m_codec_ctx->sample_fmt); - m_converter->SetInputSampleRate(m_codec_ctx->sample_rate); -- m_converter->SetInputChannelLayout(m_codec_ctx->channel_layout); -+ m_converter->SetInputChannelLayout(&(m_codec_ctx->ch_layout)); - m_converter->SetOutputSampleFormat(AV_SAMPLE_FMT_S16); - m_converter->SetOutputSampleRate(m_output_sample_rate); -- m_converter->SetOutputChannelLayout(av_get_default_channel_layout(m_output_channels)); -+ m_converter->SetOutputChannelLayout(&output_channel_layout); - auto ret = m_converter->Init(); - if (ret != 0) { - SetError("Could not create an audio converter instance", ret); -@@ -203,10 +203,11 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) { - } - } - -+ av_channel_layout_uninit(&output_channel_layout); -+ - m_opened = true; -- m_finished = false; -- m_got_frame = 0; -- m_nb_packets = 0; -+ m_has_more_packets = true; -+ m_has_more_frames = true; - m_decode_error = 0; - - return true; -@@ -214,6 +215,7 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) { - - inline void FFmpegAudioReader::Close() { - av_frame_free(&m_frame); -+ av_packet_free(&m_packet); - - m_stream_index = -1; - -@@ -252,91 +254,98 @@ inline bool FFmpegAudioReader::Read(const int16_t **data, size_t *size) { - return false; - } - -+ *data = nullptr; -+ *size = 0; -+ - int ret; -+ bool needs_packet = false; - while (true) { -- while (m_packet.size <= 0) { -- av_packet_unref(&m_packet0); -- av_init_packet(&m_packet); -- m_packet.data = nullptr; -- m_packet.size = 0; -- ret = av_read_frame(m_format_ctx, &m_packet); -+ while (needs_packet && m_packet->size == 0) { -+ ret = av_read_frame(m_format_ctx, m_packet); - if (ret < 0) { - if (ret == AVERROR_EOF) { -- m_finished = true; -+ needs_packet = false; -+ m_has_more_packets = false; - break; -- } else { -+ } -+ SetError("Error reading from the audio source", ret); -+ return false; -+ } -+ if (m_packet->stream_index == m_stream_index) { -+ needs_packet = false; -+ } else { -+ av_packet_unref(m_packet); -+ } -+ } -+ -+ if (m_packet->size != 0) { -+ ret = avcodec_send_packet(m_codec_ctx, m_packet); -+ if (ret < 0) { -+ if (ret != AVERROR(EAGAIN)) { - SetError("Error reading from the audio source", ret); - return false; - } -- } -- m_packet0 = m_packet; -- if (m_packet.stream_index != m_stream_index) { -- m_packet.data = nullptr; -- m_packet.size = 0; - } else { -- m_nb_packets++; -+ av_packet_unref(m_packet); - } - } - -- ret = avcodec_decode_audio4(m_codec_ctx, m_frame, &m_got_frame, &m_packet); -+ ret = avcodec_receive_frame(m_codec_ctx, m_frame); - if (ret < 0) { -- if (m_decode_error) { -- SetError("Error decoding audio frame", m_decode_error); -- return false; -+ if (ret == AVERROR_EOF) { -+ m_has_more_frames = false; -+ } else if (ret == AVERROR(EAGAIN)) { -+ if (m_has_more_packets) { -+ needs_packet = true; -+ continue; -+ } else { -+ m_has_more_frames = false; -+ } - } -- m_decode_error = ret; -- m_packet.data = nullptr; -- m_packet.size = 0; -- continue; -+ SetError("Error decoding the audio source", ret); -+ return false; - } - -- break; -- } -- -- m_decode_error = 0; -- -- const int decoded = std::min(ret, m_packet.size); -- m_packet.data += decoded; -- m_packet.size -= decoded; -- -- if (m_got_frame) { -- if (m_converter) { -- if (m_frame->nb_samples > m_convert_buffer_nb_samples) { -- int linsize; -- av_freep(&m_convert_buffer[0]); -- m_convert_buffer_nb_samples = std::max(1024 * 8, m_frame->nb_samples); -- ret = av_samples_alloc(m_convert_buffer, &linsize, m_codec_ctx->channels, m_convert_buffer_nb_samples, AV_SAMPLE_FMT_S16, 1); -- if (ret < 0) { -- SetError("Couldn't allocate audio converter buffer", ret); -+ if (m_frame->nb_samples > 0) { -+ if (m_converter) { -+ if (m_frame->nb_samples > m_convert_buffer_nb_samples) { -+ int linsize; -+ av_freep(&m_convert_buffer[0]); -+ m_convert_buffer_nb_samples = std::max(1024 * 8, m_frame->nb_samples); -+ ret = av_samples_alloc(m_convert_buffer, &linsize, m_codec_ctx->ch_layout.nb_channels, m_convert_buffer_nb_samples, AV_SAMPLE_FMT_S16, 1); -+ if (ret < 0) { -+ SetError("Couldn't allocate audio converter buffer", ret); -+ return false; -+ } -+ } -+ auto nb_samples = m_converter->Convert(m_convert_buffer, m_convert_buffer_nb_samples, (const uint8_t **) m_frame->data, m_frame->nb_samples); -+ if (nb_samples < 0) { -+ SetError("Couldn't convert audio", ret); - return false; - } -- } -- auto nb_samples = m_converter->Convert(m_convert_buffer, m_convert_buffer_nb_samples, (const uint8_t **) m_frame->data, m_frame->nb_samples); -- if (nb_samples < 0) { -- SetError("Couldn't convert audio", ret); -- return false; -- } -- *data = (const int16_t *) m_convert_buffer[0]; -- *size = nb_samples; -- } else { -- *data = (const int16_t *) m_frame->data[0]; -- *size = m_frame->nb_samples; -- } -- } else { -- if (m_finished && m_converter) { -- auto nb_samples = m_converter->Flush(m_convert_buffer, m_convert_buffer_nb_samples); -- if (nb_samples < 0) { -- SetError("Couldn't convert audio", ret); -- return false; -- } else if (nb_samples > 0) { -- m_got_frame = 1; - *data = (const int16_t *) m_convert_buffer[0]; - *size = nb_samples; -+ } else { -+ *data = (const int16_t *) m_frame->data[0]; -+ *size = m_frame->nb_samples; -+ } -+ } else { -+ if (m_converter) { -+ if (IsFinished()) { -+ auto nb_samples = m_converter->Flush(m_convert_buffer, m_convert_buffer_nb_samples); -+ if (nb_samples < 0) { -+ SetError("Couldn't convert audio", ret); -+ return false; -+ } else if (nb_samples > 0) { -+ *data = (const int16_t *) m_convert_buffer[0]; -+ *size = nb_samples; -+ } -+ } - } - } -- } - -- return true; -+ return true; -+ } - } - - inline void FFmpegAudioReader::SetError(const char *message, int errnum) { -diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt -index a2b517b..123e643 100644 ---- a/tests/CMakeLists.txt -+++ b/tests/CMakeLists.txt -@@ -38,6 +38,12 @@ set(SRCS - - if(BUILD_TOOLS) - set(SRCS ${SRCS} ../src/audio/ffmpeg_audio_reader_test.cpp) -+ include_directories( -+ ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS} -+ ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS} -+ ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS} -+ ${AUDIO_PROCESSOR_INCLUDE_DIRS} -+ ) - link_libraries(fpcalc_libs) - endif() - --- -2.38.1 - - diff --git a/srcpkgs/chromaprint/template b/srcpkgs/chromaprint/template index 1b990191b7fb02..70a39eafa68da0 100644 --- a/srcpkgs/chromaprint/template +++ b/srcpkgs/chromaprint/template @@ -1,18 +1,19 @@ # Template file for 'chromaprint' pkgname=chromaprint -version=1.5.1 -revision=2 +version=1.6.0 +revision=1 build_style=cmake configure_args="-DBUILD_TOOLS=ON" -make_check_target="check" -makedepends="fftw-devel ffmpeg6-devel" +# this ends with a 'nothing to do', BUILD_TESTS runs before 'do_check' +make_check_target="all_tests" +makedepends="fftw-devel ffmpeg-devel" short_desc="Library that extracts fingerprints from any audio source" maintainer="Orphaned " license="MIT, LGPL-2.1-only" homepage="https://acoustid.org/chromaprint" changelog="https://raw.githubusercontent.com/acoustid/chromaprint/master/NEWS.txt" distfiles="https://github.com/acoustid/chromaprint/releases/download/v${version}/chromaprint-${version}.tar.gz" -checksum=a1aad8fa3b8b18b78d3755b3767faff9abb67242e01b478ec9a64e190f335e1c +checksum=9d33482e56a1389a37a0d6742c376139fa43e3b8a63d29003222b93db2cb40da if [ -z "$XBPS_CHECK_PKGS" ] || [ "$CROSS_BUILD" ]; then configure_args+=" -DBUILD_TESTS=OFF" From 4aff0b6c91653fd03a28bccd493f98c71024d4a2 Mon Sep 17 00:00:00 2001 From: zlice Date: Sat, 20 Dec 2025 10:59:06 -0500 Subject: [PATCH 063/115] obs: revbump for ffmpeg9 --- srcpkgs/obs/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/obs/template b/srcpkgs/obs/template index 90772363a1cc00..892bf516418be3 100644 --- a/srcpkgs/obs/template +++ b/srcpkgs/obs/template @@ -1,7 +1,7 @@ # Template file for 'obs' pkgname=obs version=32.1.2 -revision=2 +revision=3 archs="i686* x86_64* ppc64le* aarch64* riscv64*" build_style=cmake configure_args="-DOBS_VERSION_OVERRIDE=${version} -DENABLE_JACK=ON @@ -13,7 +13,7 @@ configure_args="-DOBS_VERSION_OVERRIDE=${version} -DENABLE_JACK=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF" hostmakedepends="pkg-config swig python3-devel qt6-base" makedepends="$(vopt_if luajit LuaJIT-devel) fdk-aac-devel - ffmpeg6-devel glu-devel jack-devel libXcomposite-devel libcurl-devel + ffmpeg-devel glu-devel jack-devel libXcomposite-devel libcurl-devel libva-devel pulseaudio-devel python3-devel speexdsp-devel v4l-utils-devel vlc-devel qt6-svg-devel x264-devel mbedtls-devel jansson-devel wayland-devel pipewire-devel libxkbcommon-devel From 89f9e007e1f768532917633b8a4867754d0e05d5 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 064/115] droidcam-obs-plugin: update to 2.5.1 --- srcpkgs/droidcam-obs-plugin/template | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/srcpkgs/droidcam-obs-plugin/template b/srcpkgs/droidcam-obs-plugin/template index 67ff1e09a7d4a2..465bd1e745a592 100644 --- a/srcpkgs/droidcam-obs-plugin/template +++ b/srcpkgs/droidcam-obs-plugin/template @@ -1,20 +1,18 @@ # Template file for 'droidcam-obs-plugin' pkgname=droidcam-obs-plugin -version=2.4.0 +version=2.5.1 revision=1 build_style=gnu-makefile make_use_env=yes make_build_args="ALLOW_STATIC=no" makedepends="obs-devel libusbmuxd-devel libjpeg-turbo-devel - ffmpeg6-devel libimobiledevice-devel" + ffmpeg-devel libimobiledevice-devel simde" short_desc="DroidCam OBS Source" maintainer="Michael Aldridge " license="GPL-2.0-only" homepage="https://github.com/dev47apps/droidcam-obs-plugin" distfiles="https://github.com/dev47apps/droidcam-obs-plugin/archive/refs/tags/$version.tar.gz" -checksum=55ffb07ca4c55d1018bfabb3029f7ac86622cfbcb05120edad62031da3f6fbc4 - -broken="does not build with obs 32.1.0" +checksum=f02dc570c0dfc3c83124d3b9758555c9b0f93d76633d2c19537154e74ddf1d2f pre_build() { mkdir -p build From e3920362696060369853a8d48e3cd7ca942e5f6f Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 065/115] droidcam: revbump for ffmpeg9 --- srcpkgs/droidcam/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/droidcam/template b/srcpkgs/droidcam/template index 083c23082fe617..4c6664761bd336 100644 --- a/srcpkgs/droidcam/template +++ b/srcpkgs/droidcam/template @@ -1,12 +1,12 @@ # Template file for 'droidcam' pkgname=droidcam version=2.1.5 -revision=1 +revision=2 build_style=gnu-makefile make_use_env=true make_build_args="USBMUXD=-lusbmuxd-2.0 APPINDICATOR=ayatana-appindicator3-0.1" hostmakedepends="pkg-config" -makedepends="pkg-config libjpeg-turbo-devel ffmpeg6-devel alsa-lib-devel +makedepends="pkg-config libjpeg-turbo-devel ffmpeg-devel alsa-lib-devel speex-devel libusbmuxd-devel libplist-devel gtk+3-devel libayatana-appindicator-devel" depends="v4l2loopback" From 6bae3640b4a10fb3101b353fceda029b06ade334 Mon Sep 17 00:00:00 2001 From: zlice Date: Tue, 23 Dec 2025 08:29:55 -0500 Subject: [PATCH 066/115] libgme: update to 0.6.4, changed to github --- srcpkgs/libgme/patches/header.patch | 14 -------------- srcpkgs/libgme/patches/ppc-musl.patch | 17 ----------------- srcpkgs/libgme/template | 12 ++++++------ 3 files changed, 6 insertions(+), 37 deletions(-) delete mode 100644 srcpkgs/libgme/patches/header.patch delete mode 100644 srcpkgs/libgme/patches/ppc-musl.patch diff --git a/srcpkgs/libgme/patches/header.patch b/srcpkgs/libgme/patches/header.patch deleted file mode 100644 index d19a0bdc1bc1ce..00000000000000 --- a/srcpkgs/libgme/patches/header.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/gme/gme.h -+++ b/gme/gme.h -@@ -4,7 +4,11 @@ - #ifndef GME_H - #define GME_H - -+#ifdef GME_INTERNAL_BUILD - #include "blargg_source.h" -+#else -+#define BLARGG_EXPORT /* blank */ -+#endif - - #ifdef __cplusplus - extern "C" { diff --git a/srcpkgs/libgme/patches/ppc-musl.patch b/srcpkgs/libgme/patches/ppc-musl.patch deleted file mode 100644 index 4a9268efbe5f73..00000000000000 --- a/srcpkgs/libgme/patches/ppc-musl.patch +++ /dev/null @@ -1,17 +0,0 @@ -This removes an invalid assumption that results in both BLARGG_LITTLE_ENDIAN -and BLARGG_BIG_ENDIAN being defined on little endian musl, as we're already -covered by __LITTLE_ENDIAN__/__BIG_ENDIAN__ (which is specified as a part -of the ELFv2 ABI itself to be always present). Glibc was not broken because -it has its own check before that. - ---- a/gme/blargg_endian.h -+++ b/gme/blargg_endian.h -@@ -36,7 +36,7 @@ - #endif - - #if defined (MSB_FIRST) || defined (__BIG_ENDIAN__) || defined (WORDS_BIGENDIAN) || \ -- defined (__sparc__) || BLARGG_CPU_POWERPC || \ -+ defined (__sparc__) || \ - (defined (BIG_ENDIAN) && BIG_ENDIAN+0 != 4321) - #define BLARGG_BIG_ENDIAN 1 - #elif !defined (__mips__) diff --git a/srcpkgs/libgme/template b/srcpkgs/libgme/template index a6e600ffaf7adf..711376f93daed5 100644 --- a/srcpkgs/libgme/template +++ b/srcpkgs/libgme/template @@ -1,16 +1,16 @@ # Template file for 'libgme' pkgname=libgme -version=0.6.3 -revision=3 +version=0.6.4 +revision=1 build_style=cmake configure_args="-DENABLE_UBSAN=OFF" makedepends="zlib-devel SDL2-devel" short_desc="Video game music file emulation/playback library" maintainer="Pierre Allegraud " license="LGPL-2.1-or-later" -homepage="https://bitbucket.org/mpyne/game-music-emu/wiki/Home" -distfiles="https://bitbucket.org/mpyne/game-music-emu/downloads/game-music-emu-${version}.tar.xz" -checksum=aba34e53ef0ec6a34b58b84e28bf8cfbccee6585cebca25333604c35db3e051d +homepage="https://github.com/libgme/game-music-emu" +distfiles="https://github.com/libgme/game-music-emu/releases/download/${version}/libgme-${version}-src.tar.gz" +checksum=6f94eac735d86bca998a7ce1170d007995191ef6d4388345a0dc5ffa1de0bafa if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then CXXFLAGS="-DMSB_FIRST=1" @@ -18,7 +18,7 @@ fi if [ "$XBPS_TARGET_ENDIAN" = "le" ]; then CXXFLAGS="-DLSB_FIRST=1" fi -CXXFLAGS+=" -DGME_INTERNAL_BUILD=1" +#CXXFLAGS+=" -DGME_INTERNAL_BUILD=1" libgme-devel_package() { short_desc+=" - development files" From 43ead4b412a544dd75d1d38d17a3702745ac2b47 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 067/115] fooyin: revbump for ffmpeg9 --- srcpkgs/fooyin/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/fooyin/template b/srcpkgs/fooyin/template index 6914fe02349c6c..2cf34de45307c8 100644 --- a/srcpkgs/fooyin/template +++ b/srcpkgs/fooyin/template @@ -1,14 +1,14 @@ # Template file for 'fooyin' pkgname=fooyin version=0.10.8 -revision=1 +revision=2 build_style=cmake configure_args=" -DBUILD_PCH=ON -DBUILD_WERROR=OFF" hostmakedepends="pkg-config qt6-base qt6-tools" makedepends="qt6-base-devel qt6-svg-devel alsa-lib-devel - ffmpeg6-devel icu-devel libarchive-devel libebur128-devel + ffmpeg-devel icu-devel libarchive-devel libebur128-devel libgme-devel libopenmpt-devel libsndfile-devel pipewire-devel SDL2-devel taglib-devel KDSingleApplication qcoro-qt6-devel" depends="qt6-svg qt6-plugin-sqlite" From baf994e7703af185e402e5b1fec759797a1c3f33 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:55:04 -0500 Subject: [PATCH 068/115] ffms2: update to 5.0 --- common/shlibs | 2 +- srcpkgs/ffms2/patches/ffmpeg5.patch | 424 ---------------------------- srcpkgs/ffms2/template | 8 +- 3 files changed, 5 insertions(+), 429 deletions(-) delete mode 100644 srcpkgs/ffms2/patches/ffmpeg5.patch diff --git a/common/shlibs b/common/shlibs index 77f1abff8c4f89..50a7ed3bf989d9 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3192,7 +3192,7 @@ libvali.so.1 vali-0.1.1_1 libphodav-3.0.so.0 phodav-3.0_1 libgfshare.so.2 libgfshare-2.0.0_1 libtacacs.so.1 tacacs-4.0.4.28_1 -libffms2.so.4 libffms2-2.23.1_1 +libffms2.so.5 libffms2-5.0.1_1 libddcutil.so.5 ddcutil-2.1.4_1 liblsmash.so.2 liblsmash-2.9.1_1 libgiac.so.0 libgiac-1.4.9r17_1 diff --git a/srcpkgs/ffms2/patches/ffmpeg5.patch b/srcpkgs/ffms2/patches/ffmpeg5.patch deleted file mode 100644 index 1479fabcafcb4e..00000000000000 --- a/srcpkgs/ffms2/patches/ffmpeg5.patch +++ /dev/null @@ -1,424 +0,0 @@ -From 45673149e9a2f5586855ad472e3059084eaa36b1 Mon Sep 17 00:00:00 2001 -From: Derek Buitenhuis -Date: Tue, 4 May 2021 14:41:21 +0100 -Subject: [PATCH] Use auto for AVCodec - -The geniuses over at FFmpeg decided to constify this API, so old -versions of the library will return AVCodec *, while new versions -of the libary will return const AVCodec *, which, in C++, are not -OK to convert between. - -Rather than use some macro hell in ffmscompat.h, we can work around -this by using auto. - -Gross. - -Signed-off-by: Derek Buitenhuis ---- - src/core/audiosource.cpp | 2 +- - src/core/indexing.cpp | 6 +++--- - src/core/videosource.cpp | 2 +- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/src/core/audiosource.cpp b/src/core/audiosource.cpp -index e4ce97c..ac09666 100644 ---- a/src/core/audiosource.cpp -+++ b/src/core/audiosource.cpp -@@ -469,7 +469,7 @@ void FFMS_AudioSource::OpenFile() { - - LAVFOpenFile(SourceFile.c_str(), FormatContext, TrackNumber); - -- AVCodec *Codec = avcodec_find_decoder(FormatContext->streams[TrackNumber]->codecpar->codec_id); -+ auto *Codec = avcodec_find_decoder(FormatContext->streams[TrackNumber]->codecpar->codec_id); - if (Codec == nullptr) - throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_CODEC, - "Audio codec not found"); -diff --git a/src/core/indexing.cpp b/src/core/indexing.cpp -index e547c5a..59fb4e8 100644 ---- a/src/core/indexing.cpp -+++ b/src/core/indexing.cpp -@@ -384,7 +384,7 @@ FFMS_TrackType FFMS_Indexer::GetTrackType(int Track) { - } - - const char *FFMS_Indexer::GetTrackCodec(int Track) { -- AVCodec *codec = avcodec_find_decoder(FormatContext->streams[Track]->codecpar->codec_id); -+ auto *codec = avcodec_find_decoder(FormatContext->streams[Track]->codecpar->codec_id); - return codec ? codec->name : nullptr; - } - -@@ -402,7 +402,7 @@ FFMS_Index *FFMS_Indexer::DoIndexing() { - UseDTS); - - if (IndexMask.count(i) && FormatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) { -- AVCodec *VideoCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id); -+ auto *VideoCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id); - if (!VideoCodec) { - FormatContext->streams[i]->discard = AVDISCARD_ALL; - IndexMask.erase(i); -@@ -433,7 +433,7 @@ FFMS_Index *FFMS_Indexer::DoIndexing() { - IndexMask.insert(i); - } - } else if (IndexMask.count(i) && FormatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) { -- AVCodec *AudioCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id); -+ auto *AudioCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id); - if (AudioCodec == nullptr) - throw FFMS_Exception(FFMS_ERROR_CODEC, FFMS_ERROR_UNSUPPORTED, - "Audio codec not found"); -diff --git a/src/core/videosource.cpp b/src/core/videosource.cpp -index b889970..8956c22 100644 ---- a/src/core/videosource.cpp -+++ b/src/core/videosource.cpp -@@ -171,7 +171,7 @@ FFMS_VideoSource::FFMS_VideoSource(const char *SourceFile, FFMS_Index &Index, in - - LAVFOpenFile(SourceFile, FormatContext, VideoTrack); - -- AVCodec *Codec = avcodec_find_decoder(FormatContext->streams[VideoTrack]->codecpar->codec_id); -+ auto *Codec = avcodec_find_decoder(FormatContext->streams[VideoTrack]->codecpar->codec_id); - if (Codec == nullptr) - throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_CODEC, - "Video codec not found"); --- -2.40.0 - -From 96cbf38ea9381829a1314f432a2c60495dcefaad Mon Sep 17 00:00:00 2001 -From: Derek Buitenhuis -Date: Tue, 4 May 2021 14:12:41 +0100 -Subject: [PATCH] all: Update AVPacket API usage - -AVPackets must all be on the heap now, since it is no longer -part of the libav* ABI. - -Signed-off-by: Derek Buitenhuis ---- - src/core/audiosource.cpp | 16 ++++++---- - src/core/indexing.cpp | 63 ++++++++++++++++++++++------------------ - src/core/indexing.h | 4 +-- - src/core/utils.cpp | 6 ---- - src/core/utils.h | 1 - - src/core/videosource.cpp | 30 ++++++++++--------- - 6 files changed, 64 insertions(+), 56 deletions(-) - -diff --git a/src/core/audiosource.cpp b/src/core/audiosource.cpp -index 37cf9ae..e4ce97c 100644 ---- a/src/core/audiosource.cpp -+++ b/src/core/audiosource.cpp -@@ -285,10 +285,15 @@ FFMS_AudioSource::AudioBlock *FFMS_AudioSource::CacheBlock(CacheIterator &pos) { - int FFMS_AudioSource::DecodeNextBlock(CacheIterator *pos) { - CurrentFrame = &Frames[PacketNumber]; - -- AVPacket Packet; -- if (!ReadPacket(&Packet)) -+ AVPacket *Packet = av_packet_alloc(); -+ if (!Packet) -+ throw FFMS_Exception(FFMS_ERROR_PARSER, FFMS_ERROR_ALLOCATION_FAILED, -+ "Could not allocate packet."); -+ if (!ReadPacket(Packet)) { -+ av_packet_free(&Packet); - throw FFMS_Exception(FFMS_ERROR_PARSER, FFMS_ERROR_UNKNOWN, - "ReadPacket unexpectedly failed to read a packet"); -+ } - - // ReadPacket may have changed the packet number - CurrentFrame = &Frames[PacketNumber]; -@@ -297,8 +302,9 @@ int FFMS_AudioSource::DecodeNextBlock(CacheIterator *pos) { - int NumberOfSamples = 0; - AudioBlock *CachedBlock = nullptr; - -- int Ret = avcodec_send_packet(CodecContext, &Packet); -- av_packet_unref(&Packet); -+ int Ret = avcodec_send_packet(CodecContext, Packet); -+ av_packet_unref(Packet); -+ av_packet_free(&Packet); - - av_frame_unref(DecodeFrame); - Ret = avcodec_receive_frame(CodecContext, DecodeFrame); -@@ -513,8 +519,6 @@ void FFMS_AudioSource::Seek() { - } - - bool FFMS_AudioSource::ReadPacket(AVPacket *Packet) { -- InitNullPacket(*Packet); -- - while (av_read_frame(FormatContext, Packet) >= 0) { - if (Packet->stream_index == TrackNumber) { - // Required because not all audio packets, especially in ogg, have a pts. Use the previous valid packet's pts instead. -diff --git a/src/core/indexing.cpp b/src/core/indexing.cpp -index 23fb95b..e547c5a 100644 ---- a/src/core/indexing.cpp -+++ b/src/core/indexing.cpp -@@ -320,7 +320,7 @@ void FFMS_Indexer::CheckAudioProperties(int Track, AVCodecContext *Context) { - } - } - --void FFMS_Indexer::ParseVideoPacket(SharedAVContext &VideoContext, AVPacket &pkt, int *RepeatPict, -+void FFMS_Indexer::ParseVideoPacket(SharedAVContext &VideoContext, AVPacket *pkt, int *RepeatPict, - int *FrameType, bool *Invisible, enum AVPictureStructure *LastPicStruct) { - if (VideoContext.Parser) { - uint8_t *OB; -@@ -330,8 +330,8 @@ void FFMS_Indexer::ParseVideoPacket(SharedAVContext &VideoContext, AVPacket &pkt - av_parser_parse2(VideoContext.Parser, - VideoContext.CodecContext, - &OB, &OBSize, -- pkt.data, pkt.size, -- pkt.pts, pkt.dts, pkt.pos); -+ pkt->data, pkt->size, -+ pkt->pts, pkt->dts, pkt->pos); - - // H.264 (PAFF) and HEVC may have one field per packet, so we need to track - // when we have a full or half frame available, and mark one of them as -@@ -351,15 +351,15 @@ void FFMS_Indexer::ParseVideoPacket(SharedAVContext &VideoContext, AVPacket &pkt - - *RepeatPict = VideoContext.Parser->repeat_pict; - *FrameType = VideoContext.Parser->pict_type; -- *Invisible = (IncompleteFrame || VideoContext.Parser->repeat_pict < 0 || (pkt.flags & AV_PKT_FLAG_DISCARD)); -+ *Invisible = (IncompleteFrame || VideoContext.Parser->repeat_pict < 0 || (pkt->flags & AV_PKT_FLAG_DISCARD)); - } else { -- *Invisible = !!(pkt.flags & AV_PKT_FLAG_DISCARD); -+ *Invisible = !!(pkt->flags & AV_PKT_FLAG_DISCARD); - } - - if (VideoContext.CodecContext->codec_id == AV_CODEC_ID_VP8) -- ParseVP8(pkt.data[0], Invisible, FrameType); -+ ParseVP8(pkt->data[0], Invisible, FrameType); - else if (VideoContext.CodecContext->codec_id == AV_CODEC_ID_VP9) -- ParseVP9(pkt.data[0], Invisible, FrameType); -+ ParseVP9(pkt->data[0], Invisible, FrameType); - } - - void FFMS_Indexer::Free() { -@@ -458,32 +458,36 @@ FFMS_Index *FFMS_Indexer::DoIndexing() { - } - } - -- AVPacket Packet; -- InitNullPacket(Packet); -+ AVPacket *Packet = av_packet_alloc(); -+ if (!Packet) -+ throw FFMS_Exception(FFMS_ERROR_CODEC, FFMS_ERROR_ALLOCATION_FAILED, -+ "Could not allocate packet."); - std::vector LastValidTS(FormatContext->nb_streams, AV_NOPTS_VALUE); - - int64_t filesize = avio_size(FormatContext->pb); - enum AVPictureStructure LastPicStruct = AV_PICTURE_STRUCTURE_UNKNOWN; -- while (av_read_frame(FormatContext, &Packet) >= 0) { -+ while (av_read_frame(FormatContext, Packet) >= 0) { - // Update progress - // FormatContext->pb can apparently be NULL when opening images. - if (IC && FormatContext->pb) { -- if ((*IC)(FormatContext->pb->pos, filesize, ICPrivate)) -+ if ((*IC)(FormatContext->pb->pos, filesize, ICPrivate)) { -+ av_packet_free(&Packet); - throw FFMS_Exception(FFMS_ERROR_CANCELLED, FFMS_ERROR_USER, - "Cancelled by user"); -+ } - } -- if (!IndexMask.count(Packet.stream_index)) { -- av_packet_unref(&Packet); -+ if (!IndexMask.count(Packet->stream_index)) { -+ av_packet_unref(Packet); - continue; - } - -- int Track = Packet.stream_index; -+ int Track = Packet->stream_index; - FFMS_Track &TrackInfo = (*TrackIndices)[Track]; -- bool KeyFrame = !!(Packet.flags & AV_PKT_FLAG_KEY); -+ bool KeyFrame = !!(Packet->flags & AV_PKT_FLAG_KEY); - ReadTS(Packet, LastValidTS[Track], (*TrackIndices)[Track].UseDTS); - - if (FormatContext->streams[Track]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) { -- int64_t PTS = TrackInfo.UseDTS ? Packet.dts : Packet.pts; -+ int64_t PTS = TrackInfo.UseDTS ? Packet->dts : Packet->pts; - if (PTS == AV_NOPTS_VALUE) { - // VPx alt-refs are output as packets which lack timestmps or durations, since - // they are invisible. Currently, the timestamp mangling code in libavformat -@@ -495,9 +499,11 @@ FFMS_Index *FFMS_Indexer::DoIndexing() { - // FFMS2 currently sorts packets by PTS, which will break decoding, otherwise. - bool HasAltRefs = (FormatContext->streams[Track]->codecpar->codec_id == AV_CODEC_ID_VP8 || - FormatContext->streams[Track]->codecpar->codec_id == AV_CODEC_ID_VP9); -- if (Packet.duration == 0 && !HasAltRefs) -+ if (Packet->duration == 0 && !HasAltRefs) { -+ av_packet_free(&Packet); - throw FFMS_Exception(FFMS_ERROR_INDEXING, FFMS_ERROR_PARSER, - "Invalid packet pts, dts, and duration"); -+ } - - if (TrackInfo.empty()) - PTS = 0; -@@ -513,7 +519,7 @@ FFMS_Index *FFMS_Indexer::DoIndexing() { - ParseVideoPacket(AVContexts[Track], Packet, &RepeatPict, &FrameType, &Invisible, &LastPicStruct); - - TrackInfo.AddVideoFrame(PTS, RepeatPict, KeyFrame, -- FrameType, Packet.pos, Invisible); -+ FrameType, Packet->pos, Invisible); - } else if (FormatContext->streams[Track]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) { - // For video seeking timestamps are used only if all packets have - // timestamps, while for audio they're used if any have timestamps, -@@ -522,28 +528,29 @@ FFMS_Index *FFMS_Indexer::DoIndexing() { - TrackInfo.HasTS = true; - - int64_t StartSample = AVContexts[Track].CurrentSample; -- uint32_t SampleCount = IndexAudioPacket(Track, &Packet, AVContexts[Track], *TrackIndices); -+ uint32_t SampleCount = IndexAudioPacket(Track, Packet, AVContexts[Track], *TrackIndices); - TrackInfo.SampleRate = AVContexts[Track].CodecContext->sample_rate; - - TrackInfo.AddAudioFrame(LastValidTS[Track], -- StartSample, SampleCount, KeyFrame, Packet.pos, Packet.flags & AV_PKT_FLAG_DISCARD); -+ StartSample, SampleCount, KeyFrame, Packet->pos, Packet->flags & AV_PKT_FLAG_DISCARD); - } - -- if (!(Packet.flags & AV_PKT_FLAG_DISCARD)) -- TrackInfo.LastDuration = Packet.duration; -+ if (!(Packet->flags & AV_PKT_FLAG_DISCARD)) -+ TrackInfo.LastDuration = Packet->duration; - -- av_packet_unref(&Packet); -+ av_packet_unref(Packet); - } -+ av_packet_free(&Packet); - - TrackIndices->Finalize(AVContexts, FormatContext->iformat->name); - return TrackIndices.release(); - } - --void FFMS_Indexer::ReadTS(const AVPacket &Packet, int64_t &TS, bool &UseDTS) { -- if (!UseDTS && Packet.pts != AV_NOPTS_VALUE) -- TS = Packet.pts; -+void FFMS_Indexer::ReadTS(const AVPacket *Packet, int64_t &TS, bool &UseDTS) { -+ if (!UseDTS && Packet->pts != AV_NOPTS_VALUE) -+ TS = Packet->pts; - if (TS == AV_NOPTS_VALUE) - UseDTS = true; -- if (UseDTS && Packet.dts != AV_NOPTS_VALUE) -- TS = Packet.dts; -+ if (UseDTS && Packet->dts != AV_NOPTS_VALUE) -+ TS = Packet->dts; - } -diff --git a/src/core/indexing.h b/src/core/indexing.h -index 3cfc3c3..5c06868 100644 ---- a/src/core/indexing.h -+++ b/src/core/indexing.h -@@ -80,10 +80,10 @@ private: - int64_t Filesize; - uint8_t Digest[20]; - -- void ReadTS(const AVPacket &Packet, int64_t &TS, bool &UseDTS); -+ void ReadTS(const AVPacket *Packet, int64_t &TS, bool &UseDTS); - void CheckAudioProperties(int Track, AVCodecContext *Context); - uint32_t IndexAudioPacket(int Track, AVPacket *Packet, SharedAVContext &Context, FFMS_Index &TrackIndices); -- void ParseVideoPacket(SharedAVContext &VideoContext, AVPacket &pkt, int *RepeatPict, int *FrameType, bool *Invisible, enum AVPictureStructure *LastPicStruct); -+ void ParseVideoPacket(SharedAVContext &VideoContext, AVPacket *pkt, int *RepeatPict, int *FrameType, bool *Invisible, enum AVPictureStructure *LastPicStruct); - void Free(); - public: - FFMS_Indexer(const char *Filename); -diff --git a/src/core/utils.cpp b/src/core/utils.cpp -index ce67533..8a2e997 100644 ---- a/src/core/utils.cpp -+++ b/src/core/utils.cpp -@@ -62,12 +62,6 @@ void ClearErrorInfo(FFMS_ErrorInfo *ErrorInfo) { - } - } - --void InitNullPacket(AVPacket &pkt) { -- av_init_packet(&pkt); -- pkt.data = nullptr; -- pkt.size = 0; --} -- - void FillAP(FFMS_AudioProperties &AP, AVCodecContext *CTX, FFMS_Track &Frames) { - AP.SampleFormat = static_cast(av_get_packed_sample_fmt(CTX->sample_fmt)); - AP.BitsPerSample = av_get_bytes_per_sample(CTX->sample_fmt) * 8; -diff --git a/src/core/utils.h b/src/core/utils.h -index 9819dc7..003ab79 100644 ---- a/src/core/utils.h -+++ b/src/core/utils.h -@@ -58,7 +58,6 @@ std::unique_ptr make_unique(Args&&... args) { - } - - void ClearErrorInfo(FFMS_ErrorInfo *ErrorInfo); --void InitNullPacket(AVPacket &pkt); - void FillAP(FFMS_AudioProperties &AP, AVCodecContext *CTX, FFMS_Track &Frames); - - void LAVFOpenFile(const char *SourceFile, AVFormatContext *&FormatContext, int Track); -diff --git a/src/core/videosource.cpp b/src/core/videosource.cpp -index 06bd161..b889970 100644 ---- a/src/core/videosource.cpp -+++ b/src/core/videosource.cpp -@@ -673,30 +673,34 @@ void FFMS_VideoSource::DecodeNextFrame(int64_t &AStartTime, int64_t &Pos) { - if (HasPendingDelayedFrames()) - return; - -- AVPacket Packet; -- InitNullPacket(Packet); -- -- while (ReadFrame(&Packet) >= 0) { -- if (Packet.stream_index != VideoTrack) { -- av_packet_unref(&Packet); -+ AVPacket *Packet = av_packet_alloc(); -+ if (!Packet) -+ throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_ALLOCATION_FAILED, -+ "Could not allocate packet."); -+ -+ while (ReadFrame(Packet) >= 0) { -+ if (Packet->stream_index != VideoTrack) { -+ av_packet_unref(Packet); - continue; - } - - if (AStartTime < 0) -- AStartTime = Frames.UseDTS ? Packet.dts : Packet.pts; -+ AStartTime = Frames.UseDTS ? Packet->dts : Packet->pts; - - if (Pos < 0) -- Pos = Packet.pos; -+ Pos = Packet->pos; - -- bool FrameFinished = DecodePacket(&Packet); -- av_packet_unref(&Packet); -- if (FrameFinished) -+ bool FrameFinished = DecodePacket(Packet); -+ av_packet_unref(Packet); -+ if (FrameFinished) { -+ av_packet_free(&Packet); - return; -+ } - } - - // Flush final frames -- InitNullPacket(Packet); -- DecodePacket(&Packet); -+ DecodePacket(Packet); -+ av_packet_free(&Packet); - } - - bool FFMS_VideoSource::SeekTo(int n, int SeekOffset) { --- -2.40.0 - -From bf9e03e9e08534c024e5a744a6437c4aac160201 Mon Sep 17 00:00:00 2001 -From: Derek Buitenhuis -Date: Tue, 4 May 2021 14:20:47 +0100 -Subject: [PATCH 2/3] configure: Remove deprecated API use - -Signed-off-by: Derek Buitenhuis ---- - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index b35ef80bc..d19714d0f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -102,10 +102,10 @@ CFLAGS="$_CFLAGS $FFMPEG_CFLAGS" - - AC_DEFUN([TEST_FFMPEG], - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -- #include -+ #include - #include - ]],[[ -- avcodec_register_all(); -+ avformat_network_init(); - swscale_version(); - ]])], [eval $1=yes], [eval $1=no]) - ]) - diff --git a/srcpkgs/ffms2/template b/srcpkgs/ffms2/template index 42f402ce680151..54f702ab892fdc 100644 --- a/srcpkgs/ffms2/template +++ b/srcpkgs/ffms2/template @@ -1,17 +1,17 @@ # Template file for 'ffms2' pkgname=ffms2 -version=2.40 -revision=2 +version=5.0 +revision=1 build_style=gnu-configure configure_args="--enable-shared --disable-static" hostmakedepends="pkg-config autoconf automake libtool" -makedepends="ffmpeg6-devel zlib-devel" +makedepends="ffmpeg-devel zlib-devel" short_desc="Libav/ffmpeg based frames server" maintainer="Orphaned " license="MIT, GPL-3.0-or-later" homepage="https://github.com/FFMS/ffms2" distfiles="${homepage}/archive/${version}.tar.gz" -checksum=82e95662946f3d6e1b529eadbd72bed196adfbc41368b2d50493efce6e716320 +checksum=7770af0bbc0063f9580a6a5c8e7c51f1788f171d7da0b352e48a1e60943a8c3c pre_configure() { mkdir -p src/config From c54f406e11d681b535c81b26ac9a756264f3cf10 Mon Sep 17 00:00:00 2001 From: zlice Date: Mon, 1 Dec 2025 12:33:09 -0500 Subject: [PATCH 069/115] libshout-idjc: update to 2.4.6-r2 --- srcpkgs/libshout-idjc/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/libshout-idjc/template b/srcpkgs/libshout-idjc/template index 508f975dd88496..740f5354b6c97c 100644 --- a/srcpkgs/libshout-idjc/template +++ b/srcpkgs/libshout-idjc/template @@ -1,6 +1,6 @@ # Template file for 'libshout-idjc' pkgname=libshout-idjc -version=2.4.6+1 +version=2.4.6+2 revision=1 build_style=gnu-configure hostmakedepends="automake libtool pkg-config" @@ -10,7 +10,7 @@ maintainer="Orphaned " license="LGPL-2.0-or-later" homepage="http://idjc.sourceforge.net" distfiles="${SOURCEFORGE_SITE}/libshoutidjc.idjc.p/${pkgname}-${version//+/-r}.tar.gz" -checksum=7594ffc5e1d435014125d7dffb15a3450bba15d480a413c49aeaa5605050e1a1 +checksum=28f99f6653a4850c840c5ec885ed2afbcd83a28cde1871d5abe19cdee3dcbb32 pre_configure() { autoreconf -fi From f78c756d0435f08c4db7f762fea675fed426f80d Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 070/115] idjc: update to 0.9.10 --- srcpkgs/idjc/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/idjc/template b/srcpkgs/idjc/template index e11a1856a759a0..7840a082294fb8 100644 --- a/srcpkgs/idjc/template +++ b/srcpkgs/idjc/template @@ -1,11 +1,11 @@ # Template file for 'idjc' pkgname=idjc -version=0.9.8 -revision=5 +version=0.9.10 +revision=1 build_style=gnu-configure hostmakedepends="pkg-config git python3 automake gettext-devel libtool" makedepends="libvorbis-devel libogg-devel jack-devel libsamplerate-devel - libflac-devel libsndfile-devel mpg123-devel ffmpeg6-devel speex-devel + libflac-devel libsndfile-devel mpg123-devel ffmpeg-devel speex-devel glib-devel pixman-devel lame-devel python3-gobject-devel libshout-idjc-devel opus-devel twolame-devel python3-mutagen python3-devel libebur128-devel" depends="python3-gobject python3-mutagen desktop-file-utils shared-mime-info python3-dbus jack" @@ -14,7 +14,7 @@ maintainer="Orphaned " license="GPL-2.0-or-later" homepage="http://idjc.sourceforge.net" distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.gz" -checksum=e5cc850d55cbe569b005df2df8910ff9dc0f6990cd1b143062e8ac35c275630b +checksum=aadd48058086baf2d95198926a60bf86b2f03fe1fdeb6b7a36cfdb0a5009ac4d pre_configure() { autoreconf -fi From 7eccedc3a23369f53b5aa6bf20ab1d462bab535f Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 071/115] guvcview: update to 2.2.2 --- srcpkgs/guvcview/template | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/srcpkgs/guvcview/template b/srcpkgs/guvcview/template index a9d75922e3573b..8ef5f1184622ec 100644 --- a/srcpkgs/guvcview/template +++ b/srcpkgs/guvcview/template @@ -1,26 +1,24 @@ # Template file for 'guvcview' pkgname=guvcview -version=2.1.0 -revision=2 -build_style=gnu-configure -configure_args="--disable-static --disable-debian-menu" +version=2.2.2 +revision=1 +build_style=cmake +# configure_args="-DUSE_SFML=ON" +# requires 3.0(.2) but everything else in void that uses SFML breaks with 3.0 hostmakedepends="pkg-config intltool autoconf automake libtool glib-devel" -makedepends="eudev-libudev-devel gtk+3-devel SDL2-devel ffmpeg6-devel libusb-devel +makedepends="eudev-libudev-devel gtk+3-devel SDL2-devel ffmpeg-devel libusb-devel pulseaudio-devel v4l-utils-devel portaudio-devel gsl-devel" +# TODO: qt6 - zlice depends="desktop-file-utils" short_desc="Simple GTK interface for capturing and viewing video from UVC devices" maintainer="Orphaned " license="GPL-3.0-or-later" homepage="http://guvcview.sourceforge.net/" distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-src-${version}.tar.bz2" -checksum=3d93e4c9fab8d1a7a9bde1a6dbbf04d6cf9d347c134b5128b4586a1d90b63cfb +checksum=6a1b1348b99e79da957a0d9e237395a54757a09db7e0c0809f6c30668b69da3b post_patch() { sed '31a#include ' -i guvcview/guvcview.c # add missing EOL in this file to fix do_check() echo >> po/POTFILES.in } - -pre_configure() { - autoreconf -fi -} From e18d16a30231cc43a2476c010f53d5132dedb5e3 Mon Sep 17 00:00:00 2001 From: zlice Date: Sat, 20 Dec 2025 11:01:46 -0500 Subject: [PATCH 072/115] mpv: revbump for ffmpeg9 --- srcpkgs/mpv/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/mpv/template b/srcpkgs/mpv/template index 332dc78cccc59f..cbd9b60584eb5e 100644 --- a/srcpkgs/mpv/template +++ b/srcpkgs/mpv/template @@ -1,7 +1,7 @@ # Template file for 'mpv' pkgname=mpv version=0.41.0 -revision=3 +revision=4 build_style=meson configure_args="-Dcdda=enabled -Ddvbin=enabled -Ddvdnav=enabled -Dlibmpv=true -Dcplugins=enabled @@ -21,7 +21,7 @@ configure_args="-Dcdda=enabled -Ddvbin=enabled -Ddvdnav=enabled $(vopt_feature pipewire pipewire) $(vopt_feature sndio sndio)" hostmakedepends="pkg-config python3-docutils $(vopt_if wayland wayland-devel)" -makedepends="MesaLib-devel ffmpeg6-devel harfbuzz-devel libXv-devel libass-devel +makedepends="MesaLib-devel ffmpeg-devel harfbuzz-devel libXv-devel libass-devel libbluray-devel libcdio-paranoia-devel libdvdnav-devel libuuid-devel libva-devel rubberband-devel uchardet-devel libplacebo-devel libarchive-devel libdisplay-info-devel $(vopt_if alsa alsa-lib-devel) $(vopt_if caca libcaca-devel) From a720052c60d4c72a9e9dcb15f2a8e9609b05e268 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 073/115] mpv-mpris: revbump for ffmpeg9 --- srcpkgs/mpv-mpris/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/mpv-mpris/template b/srcpkgs/mpv-mpris/template index 13e5bb10e24120..a796f9c1b24921 100644 --- a/srcpkgs/mpv-mpris/template +++ b/srcpkgs/mpv-mpris/template @@ -1,13 +1,13 @@ # Template file for 'mpv-mpris' pkgname=mpv-mpris version=1.2 -revision=1 +revision=2 build_style=gnu-makefile make_use_env=yes make_build_target=mpris.so make_check_target=test hostmakedepends="pkg-config" -makedepends="libglib-devel mpv-devel ffmpeg6-devel" +makedepends="libglib-devel mpv-devel ffmpeg-devel" depends="mpv" checkdepends="mpv playerctl sound-theme-freedesktop xvfb-run xauth jq socat dbus" From 07e3b6cb0e1cda31169fa6207e5fcf1b045150fd Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 074/115] notcurses: update to 3.0.17 --- srcpkgs/notcurses/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/notcurses/template b/srcpkgs/notcurses/template index 5704c264d66844..b26b9f41f1a724 100644 --- a/srcpkgs/notcurses/template +++ b/srcpkgs/notcurses/template @@ -1,11 +1,11 @@ # Template file for 'notcurses' pkgname=notcurses -version=3.0.9 -revision=3 +version=3.0.17 +revision=1 build_style=cmake configure_args="-DUSE_STATIC=ON -DUSE_QRCODEGEN=On $(vopt_bool man USE_PANDOC)" hostmakedepends="pkg-config $(vopt_if man pandoc)" -makedepends="libunistring-devel ffmpeg6-devel ncurses-libtinfo-devel qrcodegen +makedepends="libunistring-devel ffmpeg-devel ncurses-libtinfo-devel qrcodegen doctest-devel libdeflate-devel" depends="ncurses-base" short_desc="Blingful character graphics/TUI library" @@ -14,7 +14,7 @@ license="Apache-2.0" homepage="https://nick-black.com/dankwiki/index.php/Notcurses" changelog="https://raw.githubusercontent.com/dankamongmen/notcurses/master/NEWS.md" distfiles="https://github.com/dankamongmen/notcurses/archive/v${version}.tar.gz" -checksum=e5cc02aea82814b843cdf34dedd716e6e1e9ca440cf0f899853ca95e241bd734 +checksum=b0fbe824984fe25b5a16770dbd00b85d44db5d09cc35bd881b95335d0db53128 build_options="man" desc_option_man="Use pandoc for manpages" From 7cf0e62b895bcd762f4f552e10cb1804b8d03454 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 075/115] osg: revbump for ffmpeg9 --- srcpkgs/osg/patches/ffmpeg5.patch | 490 ----- srcpkgs/osg/patches/ffmpeg8-osg-pr1281.patch | 1770 ++++++++++++++++++ srcpkgs/osg/patches/musl-fileutil.patch | 12 + srcpkgs/osg/template | 4 +- 4 files changed, 1784 insertions(+), 492 deletions(-) delete mode 100644 srcpkgs/osg/patches/ffmpeg5.patch create mode 100644 srcpkgs/osg/patches/ffmpeg8-osg-pr1281.patch create mode 100644 srcpkgs/osg/patches/musl-fileutil.patch diff --git a/srcpkgs/osg/patches/ffmpeg5.patch b/srcpkgs/osg/patches/ffmpeg5.patch deleted file mode 100644 index ae46dcd4c467e3..00000000000000 --- a/srcpkgs/osg/patches/ffmpeg5.patch +++ /dev/null @@ -1,490 +0,0 @@ -Index: openscenegraph-3.6.5+dfsg1/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp -=================================================================== ---- openscenegraph-3.6.5+dfsg1.orig/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp -+++ openscenegraph-3.6.5+dfsg1/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp -@@ -45,12 +45,19 @@ static int decode_audio(AVCodecContext * - if (!frame) - return AVERROR(ENOMEM); - -- ret = avcodec_decode_audio4(avctx, frame, &got_frame, &avpkt); -+ ret = avcodec_send_packet(avctx, &avpkt); -+ if (ret >= 0) { -+ ret = avcodec_receive_frame(avctx, frame); -+ if (ret == 0) { -+ got_frame = 1; -+ } -+ } -+ - - #ifdef USE_AVRESAMPLE // libav's AVFrame structure does not contain a 'channels' field - if (ret >= 0 && got_frame) { - #else -- if (ret >= 0 && got_frame && av_frame_get_channels(frame)>0) { -+ if (ret >= 0 && got_frame && frame->ch_layout.nb_channels>0) { - #endif - int ch, plane_size; - int planar = av_sample_fmt_is_planar(avctx->sample_fmt); -@@ -151,11 +158,13 @@ void FFmpegDecoderAudio::open(AVStream * - return; - - m_stream = stream; -- m_context = stream->codec; -- -- m_in_sample_rate = m_context->sample_rate; -- m_in_nb_channels = m_context->channels; -- m_in_sample_format = m_context->sample_fmt; -+ AVCodecParameters* avp = stream->codecpar; -+ const AVCodec * p_codec = avcodec_find_decoder(avp->codec_id); -+ m_context = avcodec_alloc_context3(p_codec); -+ -+ m_in_sample_rate = avp->sample_rate; -+ m_in_nb_channels = avp->channels; -+ m_in_sample_format = ((AVSampleFormat)(avp->format)); - - AVDictionaryEntry *opt_out_sample_rate = av_dict_get( *parameters->getOptions(), "out_sample_rate", NULL, 0 ); - if ( opt_out_sample_rate ) -@@ -210,11 +219,10 @@ printf("### CONVERTING from sample forma - } - - // Check stream sanity -- if (m_context->codec_id == AV_CODEC_ID_NONE) -+ if (avp->codec_id == AV_CODEC_ID_NONE) - throw std::runtime_error("invalid audio codec");; - - // Find the decoder for the audio stream -- AVCodec * const p_codec = avcodec_find_decoder(m_context->codec_id); - - if (p_codec == 0) - throw std::runtime_error("avcodec_find_decoder() failed"); -diff -Naur old/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp new/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp ---- old/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp 2020-01-31 21:03:07.000000000 +1000 -+++ new/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp 2023-11-26 08:09:37.280442193 +1000 -@@ -62,7 +62,7 @@ - { - // Open video file - AVFormatContext * p_format_context = 0; -- AVInputFormat *iformat = 0; -+ const AVInputFormat *iformat = 0; - - if (filename.compare(0, 5, "/dev/")==0) - { -@@ -304,12 +304,11 @@ - else - { - // Make the packet data available beyond av_read_frame() logical scope. -- if ((error = av_dup_packet(&packet)) < 0) { -- OSG_FATAL << "av_dup_packet() returned " << AvStrError(error) << std::endl; -- throw std::runtime_error("av_dup_packet() failed"); -+ if ((error = av_packet_ref(&(m_pending_packet.packet), &packet)) < 0) { -+ OSG_FATAL << "av_packet_ref() returned " << AvStrError(error) << std::endl; -+ throw std::runtime_error("av_packet_ref() failed"); - } -- -- m_pending_packet = FFmpegPacket(packet); -+ m_pending_packet.type = FFmpegPacket::PACKET_DATA; - } - } - -diff -Naur old/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp new/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp ---- old/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp 2020-01-31 21:03:07.000000000 +1000 -+++ new/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp 2023-11-26 13:07:02.501812075 +1000 -@@ -6,6 +6,9 @@ - #include - #include - -+#include -+ -+ - namespace osgFFmpeg { - - // TODO - add support for using RGB or RGBA pixel format. -@@ -18,8 +21,6 @@ - m_stream(0), - m_context(0), - m_codec(0), -- m_packet_data(0), -- m_bytes_remaining(0), - m_packet_pts(AV_NOPTS_VALUE), - m_writeBuffer(0), - m_user_data(0), -@@ -61,8 +62,12 @@ - - void FFmpegDecoderVideo::open(AVStream * const stream) - { -+ int linesizes[4]; -+ - m_stream = stream; -- m_context = stream->codec; -+ -+ if (avcodec_parameters_to_context(m_context, stream->codecpar) < 0) -+ throw std::runtime_error("avcodec_parameters_to_context() failed inside FFMpegDecoderVideo::open()"); - - // Trust the video size given at this point - // (avcodec_open seems to sometimes return a 0x0 size) -@@ -99,11 +104,15 @@ - - // Allocate converted RGB frame - m_frame_rgba.reset(av_frame_alloc()); -- m_buffer_rgba[0].resize(avpicture_get_size(AV_PIX_FMT_RGB24, width(), height())); -+ m_buffer_rgba[0].resize(av_image_get_buffer_size(AV_PIX_FMT_RGB24, width(), height(), 1)); - m_buffer_rgba[1].resize(m_buffer_rgba[0].size()); - - // Assign appropriate parts of the buffer to image planes in m_frame_rgba -+#if BCS - avpicture_fill((AVPicture *) (m_frame_rgba).get(), &(m_buffer_rgba[0])[0], AV_PIX_FMT_RGB24, width(), height()); -+#else -+ av_image_fill_arrays(m_frame_rgba.get()->data, linesizes, &(m_buffer_rgba[0])[0], AV_PIX_FMT_RGB24, width(), height(), 1); -+#endif - - // Override get_buffer()/release_buffer() from codec context in order to retrieve the PTS of each frame. - m_context->opaque = this; -@@ -148,128 +157,123 @@ - } - - -- --void FFmpegDecoderVideo::decodeLoop() -+double FFmpegDecoderVideo::calculateFramePTS(int64_t packet_dts) - { -- FFmpegPacket packet; -- double pts; -+ double pts = 0; - -- while (! m_exit) -+#if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(57,24,102) -+ //ffmpeg-3.0 and below -+ AVRational timebase; -+ // Find out the frame pts -+ if (m_frame->pts != int64_t(AV_NOPTS_VALUE)) - { -- // Work on the current packet until we have decoded all of it -- -- while (m_bytes_remaining > 0) -- { -- // Save global PTS to be stored in m_frame via getBuffer() -+ pts = m_frame->pts; -+ timebase = m_context->time_base; -+ } -+ else if (packet_dts == int64_t(AV_NOPTS_VALUE) && -+ m_frame->opaque != 0 && -+ *reinterpret_cast(m_frame->opaque) != int64_t(AV_NOPTS_VALUE)) -+ { -+ pts = *reinterpret_cast(m_frame->opaque); -+ timebase = m_stream->time_base; -+ } -+ else if (packet_dts != int64_t(AV_NOPTS_VALUE)) -+ { -+ pts = packet_dts; -+ timebase = m_stream->time_base; -+ } -+ else -+ { -+ timebase = m_context->time_base; -+ } - -- m_packet_pts = packet.packet.pts; -+ pts *= av_q2d(timebase); - -- // Decode video frame -+#else -+ //above ffmpeg-3.0 -+ // Find out the frame pts -+ if (m_frame->pts != int64_t(AV_NOPTS_VALUE)) -+ { -+ pts = av_q2d(m_stream->time_base) * m_frame->pts; -+ } -+ else if (packet_dts == int64_t(AV_NOPTS_VALUE) && -+ m_frame->opaque != 0 && -+ *reinterpret_cast(m_frame->opaque) != int64_t(AV_NOPTS_VALUE)) -+ { -+ pts = av_q2d(m_stream->time_base) * *reinterpret_cast(m_frame->opaque); -+ } -+ else if (packet_dts != int64_t(AV_NOPTS_VALUE)) -+ { -+ pts = av_q2d(m_stream->time_base) * packet_dts; -+ } -+#endif - -- int frame_finished = 0; -+ return pts; -+} - -- // We want to use the entire packet since some codecs will require extra information for decoding -- const int bytes_decoded = avcodec_decode_video2(m_context, m_frame.get(), &frame_finished, &(packet.packet)); - -- if (bytes_decoded < 0) -- throw std::runtime_error("avcodec_decode_video failed()"); -+void FFmpegDecoderVideo::decodeLoop() -+{ -+ bool need_more_data = true; -+ FFmpegPacket packet; - -- m_bytes_remaining -= bytes_decoded; -- m_packet_data += bytes_decoded; -+ while (! m_exit) -+ { -+ if (need_more_data) -+ { -+ bool is_empty = true; -+ packet = m_packets.timedPop(is_empty, 10); - -- // Publish the frame if we have decoded a complete frame -- if (frame_finished) -+ if (! is_empty) - { --#if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(57,24,102) -- //ffmpeg-3.0 and below -- AVRational timebase; -- // Find out the frame pts -- if (m_frame->pts != int64_t(AV_NOPTS_VALUE)) -- { -- pts = m_frame->pts; -- timebase = m_context->time_base; -- } -- else if (packet.packet.dts == int64_t(AV_NOPTS_VALUE) && -- m_frame->opaque != 0 && -- *reinterpret_cast(m_frame->opaque) != int64_t(AV_NOPTS_VALUE)) -- { -- pts = *reinterpret_cast(m_frame->opaque); -- timebase = m_stream->time_base; -- } -- else if (packet.packet.dts != int64_t(AV_NOPTS_VALUE)) -- { -- pts = packet.packet.dts; -- timebase = m_stream->time_base; -- } -- else -- { -- pts = 0; -- timebase = m_context->time_base; -- } -- -- pts *= av_q2d(timebase); -+ if (packet.type == FFmpegPacket::PACKET_FLUSH) -+ avcodec_flush_buffers(m_context); - --#else -- //above ffmpeg-3.0 -- // Find out the frame pts -- if (m_frame->pts != int64_t(AV_NOPTS_VALUE)) -- { -- pts = av_q2d(m_stream->time_base) * m_frame->pts; -- } -- else if (packet.packet.dts == int64_t(AV_NOPTS_VALUE) && -- m_frame->opaque != 0 && -- *reinterpret_cast(m_frame->opaque) != int64_t(AV_NOPTS_VALUE)) -- { -- pts = av_q2d(m_stream->time_base) * *reinterpret_cast(m_frame->opaque); -- } -- else if (packet.packet.dts != int64_t(AV_NOPTS_VALUE)) -- { -- pts = av_q2d(m_stream->time_base) * packet.packet.dts; -- } -- else -- { -- pts = 0; -- } --#endif -- const double synched_pts = m_clocks.videoSynchClock(m_frame.get(), av_q2d(av_inv_q(m_context->framerate)), pts); -- const double frame_delay = m_clocks.videoRefreshSchedule(synched_pts); -+ // Save global PTS to be stored in m_frame via getBuffer() -+ m_packet_pts = packet.packet.pts; - -- publishFrame(frame_delay, m_clocks.audioDisabled()); -+ if (avcodec_send_packet(m_context, &packet.packet) < 0) -+ throw std::runtime_error("avcodec_send_packet() failed inside FFmpegDecoderVideo::decodeLoop()"); - } -- } -- -- while(m_paused && !m_exit) -- { -- microSleep(10000); -- } -+ } - -- // Get the next packet -+ const int decode_status = avcodec_receive_frame(m_context, m_frame.get()); - -- pts = 0; -+ if (decode_status == 0) -+ { -+ // Completed at least one full frame -+ need_more_data = false; - -- if (packet.valid()) -- packet.clear(); -+ const double pts = calculateFramePTS(m_frame.get()->pkt_dts); -+ const double synched_pts = m_clocks.videoSynchClock(m_frame.get(), av_q2d(av_inv_q(m_context->framerate)), pts); -+ const double frame_delay = m_clocks.videoRefreshSchedule(synched_pts); - -- bool is_empty = true; -- packet = m_packets.timedPop(is_empty, 10); -+ publishFrame(frame_delay, m_clocks.audioDisabled()); -+ } -+ else if (decode_status == AVERROR(EOF)) -+ { -+ // Decoder has reached end of the stream -+ return; -+ } -+ else if (decode_status == AVERROR(EAGAIN)) -+ { -+ // Frame not yet complete -+ need_more_data = true; -+ -+ if (packet.valid()) -+ packet.clear(); -+ } -+ else -+ throw std::runtime_error("avcodec_receive_frame() failed inside FFmpegDecoderVideo::decodeLoop()"); - -- if (! is_empty) -+ while(m_paused && !m_exit) - { -- if (packet.type == FFmpegPacket::PACKET_DATA) -- { -- m_bytes_remaining = packet.packet.size; -- m_packet_data = packet.packet.data; -- } -- else if (packet.type == FFmpegPacket::PACKET_FLUSH) -- { -- avcodec_flush_buffers(m_context); -- } -+ microSleep(10000); - } - } - } - - -- - void FFmpegDecoderVideo::findAspectRatio() - { - float ratio = 0.0f; -@@ -283,7 +287,8 @@ - m_pixel_aspect_ratio = ratio; - } - --int FFmpegDecoderVideo::convert(AVPicture *dst, int dst_pix_fmt, AVPicture *src, -+ -+int FFmpegDecoderVideo::convert(AVFrame *dst, int dst_pix_fmt, AVFrame *src, - int src_pix_fmt, int src_width, int src_height) - { - osg::Timer_t startTick = osg::Timer::instance()->tick(); -@@ -318,6 +323,8 @@ - - void FFmpegDecoderVideo::publishFrame(const double delay, bool audio_disabled) - { -+ int linesizes[4]; -+ - // If no publishing function, just ignore the frame - if (m_publish_func == 0) - return; -@@ -334,11 +341,11 @@ - return; - #endif - -- AVPicture * const src = (AVPicture *) m_frame.get(); -- AVPicture * const dst = (AVPicture *) m_frame_rgba.get(); -+ AVFrame * const src = (AVFrame *) m_frame.get(); -+ AVFrame * const dst = (AVFrame *) m_frame_rgba.get(); - - // Assign appropriate parts of the buffer to image planes in m_frame_rgba -- avpicture_fill((AVPicture *) (m_frame_rgba).get(), &(m_buffer_rgba[m_writeBuffer])[0], AV_PIX_FMT_RGB24, width(), height()); -+ av_image_fill_arrays(m_frame_rgba.get()->data, linesizes, &(m_buffer_rgba[m_writeBuffer])[0], AV_PIX_FMT_RGB24, width(), height(), 1); - - // Convert YUVA420p (i.e. YUV420p plus alpha channel) using our own routine - -@@ -370,7 +377,7 @@ - - - --void FFmpegDecoderVideo::yuva420pToRgba(AVPicture * const dst, AVPicture * const src, int width, int height) -+void FFmpegDecoderVideo::yuva420pToRgba(AVFrame * const dst, AVFrame * const src, int width, int height) - { - convert(dst, AV_PIX_FMT_RGB24, src, m_context->pix_fmt, width, height); - -diff -Naur old/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp new/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp ---- old/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp 2020-01-31 21:03:07.000000000 +1000 -+++ new/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp 2023-11-26 09:34:00.040263426 +1000 -@@ -87,10 +87,11 @@ - void decodeLoop(); - void findAspectRatio(); - void publishFrame(double delay, bool audio_disabled); -+ double calculateFramePTS(int64_t packet_dts); - double synchronizeVideo(double pts); -- void yuva420pToRgba(AVPicture *dst, AVPicture *src, int width, int height); -+ void yuva420pToRgba(AVFrame *dst, AVFrame *src, int width, int height); - -- int convert(AVPicture *dst, int dst_pix_fmt, AVPicture *src, -+ int convert(AVFrame *dst, int dst_pix_fmt, AVFrame *src, - int src_pix_fmt, int src_width, int src_height); - - -@@ -101,9 +102,7 @@ - FFmpegClocks & m_clocks; - AVStream * m_stream; - AVCodecContext * m_context; -- AVCodec * m_codec; -- const uint8_t * m_packet_data; -- int m_bytes_remaining; -+ const AVCodec * m_codec; - int64_t m_packet_pts; - - FramePtr m_frame; -diff -Naur old/src/osgPlugins/ffmpeg/FFmpegPacket.hpp new/src/osgPlugins/ffmpeg/FFmpegPacket.hpp ---- old/src/osgPlugins/ffmpeg/FFmpegPacket.hpp 2020-01-31 21:03:07.000000000 +1000 -+++ new/src/osgPlugins/ffmpeg/FFmpegPacket.hpp 2023-11-26 07:20:03.739547190 +1000 -@@ -42,7 +42,7 @@ - void clear() - { - if (packet.data != 0) -- av_free_packet(&packet); -+ av_packet_unref(&packet); - - release(); - } -diff -Naur old/src/osgPlugins/ffmpeg/FFmpegParameters.hpp new/src/osgPlugins/ffmpeg/FFmpegParameters.hpp ---- old/src/osgPlugins/ffmpeg/FFmpegParameters.hpp 2020-01-31 21:03:07.000000000 +1000 -+++ new/src/osgPlugins/ffmpeg/FFmpegParameters.hpp 2023-11-26 13:09:25.198807036 +1000 -@@ -20,7 +20,7 @@ - - bool isFormatAvailable() const { return m_format!=NULL; } - -- AVInputFormat* getFormat() { return m_format; } -+ const AVInputFormat* getFormat() { return m_format; } - AVDictionary** getOptions() { return &m_options; } - void setContext(AVIOContext* context) { m_context = context; } - AVIOContext* getContext() { return m_context; } -@@ -29,7 +29,7 @@ - - protected: - -- AVInputFormat* m_format; -+ const AVInputFormat* m_format; - AVIOContext* m_context; - AVDictionary* m_options; - }; -diff -Naur old/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp new/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp ---- old/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp 2020-01-31 21:03:07.000000000 +1000 -+++ new/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp 2023-11-26 13:25:22.060773249 +1000 -@@ -20,7 +20,7 @@ - #include - - --#if LIBAVCODEC_VERSION_MAJOR >= 53 || \ -+#if (LIBAVCODEC_VERSION_MAJOR>=53 && LIBAVCODEC_VERSION_MAJOR<=58) || \ - (LIBAVCODEC_VERSION_MAJOR==52 && LIBAVCODEC_VERSION_MINOR>=30) || \ - (LIBAVCODEC_VERSION_MAJOR==52 && LIBAVCODEC_VERSION_MINOR==20 && LIBAVCODEC_VERSION_MICRO >= 1) - #define USE_AV_LOCK_MANAGER -@@ -117,8 +117,11 @@ - // enable thread locking - av_lockmgr_register(&lockMgr); - #endif -- // Register all FFmpeg formats/codecs -+ -+#if LIBAVCODEC_VERSION_MAJOR<=57 -+ // Register all FFmpeg formats/codecs--- not required in FFmpeg 4.0 and later - av_register_all(); -+#endif - - avformat_network_init(); - } diff --git a/srcpkgs/osg/patches/ffmpeg8-osg-pr1281.patch b/srcpkgs/osg/patches/ffmpeg8-osg-pr1281.patch new file mode 100644 index 00000000000000..1f10ddb530e77a --- /dev/null +++ b/srcpkgs/osg/patches/ffmpeg8-osg-pr1281.patch @@ -0,0 +1,1770 @@ +From 26f6c9b5a63715dde3c9f85c8faf035d3ec0f657 Mon Sep 17 00:00:00 2001 +From: Pei Jia +Date: Tue, 18 Jun 2024 14:18:44 -0700 +Subject: [PATCH] Compatible with FFmpeg-7.0.1 + +--- + .../OpenCASCADE/ReaderWriterOpenCASCADE.cpp | 2 +- + src/osgPlugins/ffmpeg/FFmpegDecoder.cpp | 78 ++---- + src/osgPlugins/ffmpeg/FFmpegDecoder.hpp | 159 +++++------ + src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp | 256 +++++++++--------- + src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp | 71 +++-- + src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp | 223 +++++---------- + src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp | 19 +- + src/osgPlugins/ffmpeg/FFmpegPacket.hpp | 2 +- + src/osgPlugins/ffmpeg/FFmpegParameters.cpp | 8 +- + src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp | 61 +---- + 10 files changed, 352 insertions(+), 527 deletions(-) + +diff --git a/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp b/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp +index 91a14220016..a43ca5d511e 100644 +--- a/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp ++++ b/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp +@@ -211,7 +211,7 @@ osg::ref_ptr ReaderWritterOpenCASCADE::OCCTKReader::_createGeomet + { + // populate vertex list + // Ref: http://www.opencascade.org/org/forum/thread_16694/?forum=3 +- gp_Pnt pt = (triangulation->Nodes())(j).Transformed(transformation * location.Transformation()); ++ gp_Pnt pt = (triangulation->Node(j)).Transformed(transformation * location.Transformation()); + vertexList->push_back(osg::Vec3(pt.X(), pt.Y(), pt.Z())); + + // populate color list +diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp b/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp +index 4de143d2279..4ce84ca733d 100644 +--- a/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp ++++ b/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp +@@ -1,4 +1,3 @@ +- + #include "FFmpegDecoder.hpp" + #include "FFmpegParameters.hpp" + +@@ -36,8 +35,10 @@ static std::string AvStrError(int errnum) + } + + FFmpegDecoder::FFmpegDecoder() : +- m_audio_stream(0), +- m_video_stream(0), ++ m_audio_stream(nullptr), ++ m_video_stream(nullptr), ++ m_audio_index(-1), ++ m_video_index(-1), + m_audio_queue(100), + m_video_queue(100), + m_audio_decoder(m_audio_queue, m_clocks), +@@ -61,10 +62,10 @@ bool FFmpegDecoder::open(const std::string & filename, FFmpegParameters* paramet + try + { + // Open video file +- AVFormatContext * p_format_context = 0; +- AVInputFormat *iformat = 0; ++ AVFormatContext * p_format_context = nullptr; ++ AVInputFormat *iformat = nullptr; + +- if (filename.compare(0, 5, "/dev/")==0) ++ if (filename.compare(0, 5, "/dev/") == 0) + { + #ifdef ANDROID + throw std::runtime_error("Device not supported on Android"); +@@ -78,24 +79,24 @@ bool FFmpegDecoder::open(const std::string & filename, FFmpegParameters* paramet + } + + std::string format = "video4linux2"; +- iformat = av_find_input_format(format.c_str()); ++ iformat = const_cast(av_find_input_format(format.c_str())); + + if (iformat) + { +- OSG_INFO<<"Found input format: "<getFormat() : 0; +- AVIOContext* context = parameters ? parameters->getContext() : 0; +- if (context != NULL) ++ iformat = parameters ? const_cast(parameters->getFormat()) : nullptr; ++ AVIOContext* context = parameters ? parameters->getContext() : nullptr; ++ if (context != nullptr) + { + p_format_context = avformat_alloc_context(); + p_format_context->pb = context; +@@ -105,22 +106,7 @@ bool FFmpegDecoder::open(const std::string & filename, FFmpegParameters* paramet + int error = avformat_open_input(&p_format_context, filename.c_str(), iformat, parameters->getOptions()); + if (error != 0) + { +- std::string error_str; +- switch (error) +- { +- //case AVERROR_UNKNOWN: error_str = "AVERROR_UNKNOWN"; break; // same value as AVERROR_INVALIDDATA +- case AVERROR_IO: error_str = "AVERROR_IO"; break; +- case AVERROR_NUMEXPECTED: error_str = "AVERROR_NUMEXPECTED"; break; +- case AVERROR_INVALIDDATA: error_str = "AVERROR_INVALIDDATA"; break; +- case AVERROR_NOMEM: error_str = "AVERROR_NOMEM"; break; +- case AVERROR_NOFMT: error_str = "AVERROR_NOFMT"; break; +- case AVERROR_NOTSUPP: error_str = "AVERROR_NOTSUPP"; break; +- case AVERROR_NOENT: error_str = "AVERROR_NOENT"; break; +- case AVERROR_PATCHWELCOME: error_str = "AVERROR_PATCHWELCOME"; break; +- default: error_str = "Unknown error"; break; +- } +- +- throw std::runtime_error("av_open_input_file() failed : " + error_str); ++ throw std::runtime_error("avformat_open_input() failed: " + AvStrError(error)); + } + + m_format_context.reset(p_format_context); +@@ -128,15 +114,15 @@ bool FFmpegDecoder::open(const std::string & filename, FFmpegParameters* paramet + // Retrieve stream info + // Only buffer up to one and a half seconds by default + float max_analyze_duration = 1.5; +- AVDictionaryEntry *mad = av_dict_get( *parameters->getOptions(), "mad", NULL, 0 ); +- if ( mad ) { ++ AVDictionaryEntry *mad = av_dict_get(*parameters->getOptions(), "mad", NULL, 0); ++ if (mad) { + max_analyze_duration = atof(mad->value); + } + p_format_context->max_analyze_duration = AV_TIME_BASE * max_analyze_duration; + // p_format_context->probesize = 100000; + + if (avformat_find_stream_info(p_format_context, NULL) < 0) +- throw std::runtime_error("av_find_stream_info() failed"); ++ throw std::runtime_error("avformat_find_stream_info() failed"); + + m_duration = double(m_format_context->duration) / AV_TIME_BASE; + if (m_format_context->start_time != static_cast(AV_NOPTS_VALUE)) +@@ -159,7 +145,7 @@ bool FFmpegDecoder::open(const std::string & filename, FFmpegParameters* paramet + m_audio_stream = m_format_context->streams[m_audio_index]; + else + { +- m_audio_stream = 0; ++ m_audio_stream = nullptr; + m_audio_index = std::numeric_limits::max(); + } + +@@ -271,7 +257,7 @@ bool FFmpegDecoder::readNextPacketNormal() + { + AVPacket packet; + +- if (! m_pending_packet) ++ if (!m_pending_packet) + { + bool end_of_stream = false; + +@@ -279,10 +265,10 @@ bool FFmpegDecoder::readNextPacketNormal() + int error = av_read_frame(m_format_context.get(), &packet); + if (error < 0) + { +- if (error == static_cast(AVERROR_EOF) || +- m_format_context.get()->pb->eof_reached) ++ if (error == static_cast(AVERROR_EOF) || m_format_context.get()->pb->eof_reached) + end_of_stream = true; +- else { ++ else ++ { + OSG_FATAL << "av_read_frame() returned " << AvStrError(error) << std::endl; + throw std::runtime_error("av_read_frame() failed"); + } +@@ -303,12 +289,6 @@ bool FFmpegDecoder::readNextPacketNormal() + } + else + { +- // Make the packet data available beyond av_read_frame() logical scope. +- if ((error = av_dup_packet(&packet)) < 0) { +- OSG_FATAL << "av_dup_packet() returned " << AvStrError(error) << std::endl; +- throw std::runtime_error("av_dup_packet() failed"); +- } +- + m_pending_packet = FFmpegPacket(packet); + } + } +@@ -340,8 +320,6 @@ bool FFmpegDecoder::readNextPacketNormal() + return false; + } + +- +- + bool FFmpegDecoder::readNextPacketEndOfStream() + { + const FFmpegPacket packet(FFmpegPacket::PACKET_END_OF_STREAM); +@@ -352,8 +330,6 @@ bool FFmpegDecoder::readNextPacketEndOfStream() + return false; + } + +- +- + bool FFmpegDecoder::readNextPacketRewinding() + { + const FFmpegPacket packet(FFmpegPacket::PACKET_FLUSH); +@@ -364,8 +340,6 @@ bool FFmpegDecoder::readNextPacketRewinding() + return false; + } + +- +- + void FFmpegDecoder::rewindButDontFlushQueues() + { + const AVRational AvTimeBaseQ = { 1, AV_TIME_BASE }; // = AV_TIME_BASE_Q +@@ -374,7 +348,8 @@ void FFmpegDecoder::rewindButDontFlushQueues() + const int64_t seek_target = av_rescale_q(pos, AvTimeBaseQ, m_video_stream->time_base); + + int error = 0; +- if ((error = av_seek_frame(m_format_context.get(), m_video_index, seek_target, 0/*AVSEEK_FLAG_BYTE |*/ /*AVSEEK_FLAG_BACKWARD*/)) < 0) { ++ if ((error = av_seek_frame(m_format_context.get(), m_video_index, seek_target, 0)) < 0) ++ { + OSG_FATAL << "av_seek_frame returned " << AvStrError(error) << std::endl; + throw std::runtime_error("av_seek_frame failed()"); + } +@@ -397,13 +372,14 @@ void FFmpegDecoder::seekButDontFlushQueues(double time) + { + const AVRational AvTimeBaseQ = { 1, AV_TIME_BASE }; // = AV_TIME_BASE_Q + +- const int64_t pos = int64_t(m_clocks.getStartTime()+time * double(AV_TIME_BASE)); ++ const int64_t pos = int64_t(m_clocks.getStartTime() + time * double(AV_TIME_BASE)); + const int64_t seek_target = av_rescale_q(pos, AvTimeBaseQ, m_video_stream->time_base); + + m_clocks.setSeekTime(time); + + int error = 0; +- if ((error = av_seek_frame(m_format_context.get(), m_video_index, seek_target, 0/*AVSEEK_FLAG_BYTE |*/ /*AVSEEK_FLAG_BACKWARD*/)) < 0) { ++ if ((error = av_seek_frame(m_format_context.get(), m_video_index, seek_target, 0)) < 0) ++ { + OSG_FATAL << "av_seek_frame() returned " << AvStrError(error) << std::endl; + throw std::runtime_error("av_seek_frame failed()"); + } +diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoder.hpp b/src/osgPlugins/ffmpeg/FFmpegDecoder.hpp +index 95d638f25d8..e79323fed36 100644 +--- a/src/osgPlugins/ffmpeg/FFmpegDecoder.hpp ++++ b/src/osgPlugins/ffmpeg/FFmpegDecoder.hpp +@@ -1,4 +1,3 @@ +- + #ifndef HEADER_GUARD_OSGFFMPEG_FFMPEG_DECODER_H + #define HEADER_GUARD_OSGFFMPEG_FFMPEG_DECODER_H + +@@ -7,73 +6,76 @@ + + #include + +- + namespace osgFFmpeg { + + class FFmpegParameters; + + class FormatContextPtr + { +- public: +- +- typedef AVFormatContext T; +- +- explicit FormatContextPtr() : _ptr(0) {} +- explicit FormatContextPtr(T* ptr) : _ptr(ptr) {} +- +- ~FormatContextPtr() +- { +- cleanup(); +- } +- +- T* get() { return _ptr; } ++public: ++ typedef AVFormatContext T; + +- operator bool() const { return _ptr != 0; } ++ explicit FormatContextPtr() : _ptr(nullptr) {} ++ explicit FormatContextPtr(T* ptr) : _ptr(ptr) {} + +- T * operator-> () const // never throws +- { +- return _ptr; +- } ++ ~FormatContextPtr() ++ { ++ cleanup(); ++ } + +- void reset(T* ptr) +- { +- if (ptr==_ptr) return; +- cleanup(); +- _ptr = ptr; +- } ++ T* get() const { return _ptr; } ++ T** getPtr() { return &_ptr; } + +- void cleanup() ++ operator T*() const { return _ptr; } ++ ++ FormatContextPtr& operator=(T* ptr) ++ { ++ reset(ptr); ++ return *this; ++ } ++ ++ bool operator==(std::nullptr_t) const { return _ptr == nullptr; } ++ bool operator!=(std::nullptr_t) const { return _ptr != nullptr; } ++ ++ T* operator->() const // never throws ++ { ++ return _ptr; ++ } ++ ++ void reset(T* ptr) ++ { ++ if (ptr == _ptr) return; ++ cleanup(); ++ _ptr = ptr; ++ } ++ ++ void cleanup() ++ { ++ if (_ptr) + { +- if (_ptr) +- { + #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 17, 0) +- OSG_NOTICE<<"Calling avformat_close_input("<<&_ptr<<")"<start_time; +- else return HUGE_VAL; ++ if (m_format_context) return m_format_context->start_time; ++ else return HUGE_VAL; + } + + inline double FFmpegDecoder::duration() const +@@ -165,37 +161,30 @@ inline double FFmpegDecoder::duration() const + + inline double FFmpegDecoder::reference() + { +- return m_clocks.getCurrentTime(); ++ return m_clocks.getCurrentTime(); + } + +- +-inline FFmpegDecoderAudio & FFmpegDecoder::audio_decoder() ++inline FFmpegDecoderAudio& FFmpegDecoder::audio_decoder() + { + return m_audio_decoder; + } + +- +-inline FFmpegDecoderVideo & FFmpegDecoder::video_decoder() ++inline FFmpegDecoderVideo& FFmpegDecoder::video_decoder() + { + return m_video_decoder; + } + +- +-inline FFmpegDecoderAudio const & FFmpegDecoder::audio_decoder() const ++inline FFmpegDecoderAudio const& FFmpegDecoder::audio_decoder() const + { + return m_audio_decoder; + } + +- +-inline FFmpegDecoderVideo const & FFmpegDecoder::video_decoder() const ++inline FFmpegDecoderVideo const& FFmpegDecoder::video_decoder() const + { + return m_video_decoder; + } + +- +- + } // namespace osgFFmpeg + +- +- + #endif // HEADER_GUARD_OSGFFMPEG_FFMPEG_DECODER_H ++ +diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp b/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp +index 636bddd2546..5cfdb231ca7 100644 +--- a/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp ++++ b/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp +@@ -1,39 +1,24 @@ + #include "FFmpegDecoderAudio.hpp" +- + #include +- + #include +-#include +- +-//DEBUG +-//#include +- ++#include ++#include ++#include + + #ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE + #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 + #endif + +-#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,1) +-#define av_frame_alloc avcodec_alloc_frame +-#define av_frame_free avcodec_free_frame +-#endif +- +-#if LIBAVCODEC_VERSION_MAJOR < 56 +- #define AV_CODEC_ID_NONE CODEC_ID_NONE +-#endif +- + namespace osgFFmpeg { + + static int decode_audio(AVCodecContext *avctx, int16_t *samples, +- int *frame_size_ptr, +- const uint8_t *buf, int buf_size, +- SwrContext *swr_context, +- int out_sample_rate, +- int out_nb_channels, +- AVSampleFormat out_sample_format) ++ int *frame_size_ptr, ++ const uint8_t *buf, int buf_size, ++ SwrContext *swr_context, ++ int out_sample_rate, ++ int out_nb_channels, ++ AVSampleFormat out_sample_format) + { +-#if LIBAVCODEC_VERSION_MAJOR >= 53 || (LIBAVCODEC_VERSION_MAJOR==52 && LIBAVCODEC_VERSION_MINOR>=32) +- + AVPacket avpkt; + av_init_packet(&avpkt); + avpkt.data = const_cast(buf); +@@ -45,30 +30,39 @@ static int decode_audio(AVCodecContext *avctx, int16_t *samples, + if (!frame) + return AVERROR(ENOMEM); + +- ret = avcodec_decode_audio4(avctx, frame, &got_frame, &avpkt); ++ // Send the packet to the decoder ++ ret = avcodec_send_packet(avctx, &avpkt); ++ if (ret < 0) { ++ av_frame_free(&frame); ++ return ret; ++ } + +-#ifdef USE_AVRESAMPLE // libav's AVFrame structure does not contain a 'channels' field +- if (ret >= 0 && got_frame) { +-#else +- if (ret >= 0 && got_frame && av_frame_get_channels(frame)>0) { +-#endif ++ // Receive the frame from the decoder ++ ret = avcodec_receive_frame(avctx, frame); ++ if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) { ++ av_frame_free(&frame); ++ return 0; ++ } else if (ret < 0) { ++ av_frame_free(&frame); ++ return ret; ++ } else { ++ got_frame = 1; ++ } ++ ++ if (ret >= 0 && got_frame && frame->ch_layout.nb_channels > 0) { + int ch, plane_size; + int planar = av_sample_fmt_is_planar(avctx->sample_fmt); + + int out_samples; + // if sample rate changes, number of samples is different +- if ( out_sample_rate != avctx->sample_rate ) { +-// out_samples = av_rescale_rnd(swr_get_delay(swr_context, avctx->sample_rate) + +-// frame->nb_samples, out_sample_rate, avctx->sample_rate, AV_ROUND_UP); ++ if (out_sample_rate != avctx->sample_rate) { + out_samples = av_rescale_rnd(frame->nb_samples, out_sample_rate, avctx->sample_rate, AV_ROUND_UP); +- } +- else { ++ } else { + out_samples = frame->nb_samples; + } + + int output_data_size = av_samples_get_buffer_size(&plane_size, out_nb_channels, +- out_samples, +- out_sample_format, 1); ++ out_samples, out_sample_format, 1); + + if (*frame_size_ptr < output_data_size) { + av_log(avctx, AV_LOG_ERROR, "output buffer size is too small for " +@@ -78,23 +72,19 @@ static int decode_audio(AVCodecContext *avctx, int16_t *samples, + } + + // if resampling is needed, call swr_convert +- if ( swr_context != NULL ) { +- ++ if (swr_context != nullptr) { + out_samples = swr_convert(swr_context, (uint8_t **)&samples, out_samples, +- (const uint8_t **)frame->extended_data, frame->nb_samples); ++ (const uint8_t **)frame->extended_data, frame->nb_samples); + + // recompute output_data_size following swr_convert result (number of samples actually converted) + output_data_size = av_samples_get_buffer_size(&plane_size, out_nb_channels, +- out_samples, +- out_sample_format, 1); +- } +- else { +- ++ out_samples, out_sample_format, 1); ++ } else { + memcpy(samples, frame->extended_data[0], plane_size); + +- if (planar && avctx->channels > 1) { ++ if (planar && frame->ch_layout.nb_channels > 1) { + uint8_t *out = ((uint8_t *)samples) + plane_size; +- for (ch = 1; ch < avctx->channels; ch++) { ++ for (ch = 1; ch < frame->ch_layout.nb_channels; ch++) { + memcpy(out, frame->extended_data[ch], plane_size); + out += plane_size; + } +@@ -102,26 +92,21 @@ static int decode_audio(AVCodecContext *avctx, int16_t *samples, + } + + *frame_size_ptr = output_data_size; +- + } else { + *frame_size_ptr = 0; + } ++ + av_frame_free(&frame); + return ret; +- +-#else +- // fallback for older versions of ffmpeg that don't have avcodec_decode_audio3. +- return avcodec_decode_audio2(avctx, samples, frame_size_ptr, buf, buf_size); +-#endif + } + + +-FFmpegDecoderAudio::FFmpegDecoderAudio(PacketQueue & packets, FFmpegClocks & clocks) : ++FFmpegDecoderAudio::FFmpegDecoderAudio(PacketQueue &packets, FFmpegClocks &clocks) : + m_packets(packets), + m_clocks(clocks), +- m_stream(0), +- m_context(0), +- m_packet_data(0), ++ m_stream(nullptr), ++ m_context(nullptr), ++ m_packet_data(nullptr), + m_bytes_remaining(0), + m_audio_buffer((AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2), + m_audio_buf_size(0), +@@ -129,7 +114,7 @@ FFmpegDecoderAudio::FFmpegDecoderAudio(PacketQueue & packets, FFmpegClocks & clo + m_end_of_stream(false), + m_paused(true), + m_exit(false), +- m_swr_context(NULL) ++ m_swr_context(nullptr) + { + } + +@@ -137,103 +122,95 @@ FFmpegDecoderAudio::FFmpegDecoderAudio(PacketQueue & packets, FFmpegClocks & clo + + FFmpegDecoderAudio::~FFmpegDecoderAudio() + { +- this->close(true); ++ close(true); + } + + + +-void FFmpegDecoderAudio::open(AVStream * const stream, FFmpegParameters* parameters) ++void FFmpegDecoderAudio::open(AVStream *stream, FFmpegParameters* parameters) + { + try + { + // Sound can be optional (i.e. no audio stream is present) +- if (stream == 0) ++ if (stream == nullptr) + return; + + m_stream = stream; +- m_context = stream->codec; ++ m_context = avcodec_alloc_context3(nullptr); ++ avcodec_parameters_to_context(m_context, stream->codecpar); + + m_in_sample_rate = m_context->sample_rate; +- m_in_nb_channels = m_context->channels; ++ m_in_nb_channels = m_context->ch_layout.nb_channels; + m_in_sample_format = m_context->sample_fmt; + +- AVDictionaryEntry *opt_out_sample_rate = av_dict_get( *parameters->getOptions(), "out_sample_rate", NULL, 0 ); +- if ( opt_out_sample_rate ) ++ AVDictionaryEntry *opt_out_sample_rate = av_dict_get(*parameters->getOptions(), "out_sample_rate", nullptr, 0); ++ if (opt_out_sample_rate) + m_out_sample_rate = atoi(opt_out_sample_rate->value); + else + m_out_sample_rate = m_in_sample_rate; + +- AVDictionaryEntry *opt_out_sample_format = av_dict_get( *parameters->getOptions(), "out_sample_format", NULL, 0 ); +- if ( opt_out_sample_format ) ++ AVDictionaryEntry *opt_out_sample_format = av_dict_get(*parameters->getOptions(), "out_sample_format", nullptr, 0); ++ if (opt_out_sample_format) + m_out_sample_format = (AVSampleFormat) atoi(opt_out_sample_format->value); + else + // always packed, planar formats are evil! +- m_out_sample_format = av_get_packed_sample_fmt( m_in_sample_format ); ++ m_out_sample_format = av_get_packed_sample_fmt(m_in_sample_format); + +- AVDictionaryEntry *opt_out_nb_channels = av_dict_get( *parameters->getOptions(), "out_nb_channels", NULL, 0 ); +- if ( opt_out_nb_channels ) ++ AVDictionaryEntry *opt_out_nb_channels = av_dict_get(*parameters->getOptions(), "out_nb_channels", nullptr, 0); ++ if (opt_out_nb_channels) + m_out_nb_channels = atoi(opt_out_nb_channels->value); + else + m_out_nb_channels = m_in_nb_channels; + +- if ( m_in_sample_rate != m_out_sample_rate ++ if (m_in_sample_rate != m_out_sample_rate + || m_in_nb_channels != m_out_nb_channels +- || m_in_sample_format != m_out_sample_format ) ++ || m_in_sample_format != m_out_sample_format) + { +-#if 0 +-printf("### CONVERTING from sample format %s TO %s\n\t\tFROM %d TO %d channels\n\t\tFROM %d Hz to %d Hz\n", +- av_get_sample_fmt_name(m_in_sample_format), +- av_get_sample_fmt_name(m_out_sample_format), +- m_in_nb_channels, +- m_out_nb_channels, +- m_in_sample_rate, +- m_out_sample_rate); +-#endif +- m_swr_context = swr_alloc_set_opts(NULL, +- av_get_default_channel_layout(m_out_nb_channels), +- m_out_sample_format, +- m_out_sample_rate, +- av_get_default_channel_layout(m_in_nb_channels), +- m_in_sample_format, +- m_in_sample_rate, +- 0, NULL ); ++ AVChannelLayout in_ch_layout; ++ AVChannelLayout out_ch_layout; ++ av_channel_layout_default(&in_ch_layout, m_in_nb_channels); ++ av_channel_layout_default(&out_ch_layout, m_out_nb_channels); ++ ++ m_swr_context = swr_alloc(); ++ if (!m_swr_context) { ++ throw std::runtime_error("Could not allocate resampler context"); ++ } + +- int err = swr_init(m_swr_context); ++ av_opt_set_int(m_swr_context, "in_channel_count", in_ch_layout.nb_channels, 0); ++ av_opt_set_int(m_swr_context, "in_sample_rate", m_in_sample_rate, 0); ++ av_opt_set_sample_fmt(m_swr_context, "in_sample_fmt", m_in_sample_format, 0); ++ av_opt_set_chlayout(m_swr_context, "in_chlayout", &in_ch_layout, 0); ++ ++ av_opt_set_int(m_swr_context, "out_channel_count", out_ch_layout.nb_channels, 0); ++ av_opt_set_int(m_swr_context, "out_sample_rate", m_out_sample_rate, 0); ++ av_opt_set_sample_fmt(m_swr_context, "out_sample_fmt", m_out_sample_format, 0); ++ av_opt_set_chlayout(m_swr_context, "out_chlayout", &out_ch_layout, 0); + +- if ( err ) { ++ int err = swr_init(m_swr_context); ++ if (err < 0) { + char error_string[512]; +- av_strerror(err, error_string, 512); ++ av_strerror(err, error_string, sizeof(error_string)); + OSG_WARN << "FFmpegDecoderAudio - WARNING: Error initializing resampling context : " << error_string << std::endl; + swr_free(&m_swr_context); +- throw std::runtime_error("swr_init() failed");; ++ throw std::runtime_error("swr_init() failed"); + } + } + +- // Check stream sanity + if (m_context->codec_id == AV_CODEC_ID_NONE) +- throw std::runtime_error("invalid audio codec");; ++ throw std::runtime_error("invalid audio codec"); + +- // Find the decoder for the audio stream +- AVCodec * const p_codec = avcodec_find_decoder(m_context->codec_id); ++ const AVCodec *p_codec = avcodec_find_decoder(m_context->codec_id); + +- if (p_codec == 0) ++ if (p_codec == nullptr) + throw std::runtime_error("avcodec_find_decoder() failed"); + +- // Inform the codec that we can handle truncated bitstreams +- //if (p_codec->capabilities & CODEC_CAP_TRUNCATED) +- // m_context->flags |= CODEC_FLAG_TRUNCATED; +- +- // Open codec +- if (avcodec_open2(m_context, p_codec, NULL) < 0) ++ if (avcodec_open2(m_context, p_codec, nullptr) < 0) + throw std::runtime_error("avcodec_open() failed"); + +- m_context->get_buffer2 = avcodec_default_get_buffer2; +- + } +- + catch (...) + { +- m_context = 0; ++ avcodec_free_context(&m_context); + throw; + } + } +@@ -260,6 +237,10 @@ void FFmpegDecoderAudio::close(bool waitForThreadToExit) + join(); + } + swr_free(&m_swr_context); ++ if (m_context) ++ { ++ avcodec_free_context(&m_context); ++ } + } + + void FFmpegDecoderAudio::setVolume(float volume) +@@ -286,7 +267,7 @@ void FFmpegDecoderAudio::run() + decodeLoop(); + } + +- catch (const std::exception & error) ++ catch (const std::exception &error) + { + OSG_WARN << "FFmpegDecoderAudio::run : " << error.what() << std::endl; + } +@@ -301,15 +282,15 @@ void FFmpegDecoderAudio::run() + void FFmpegDecoderAudio::setAudioSink(osg::ref_ptr audio_sink) + { + // The FFmpegDecoderAudio object takes the responsibility of destroying the audio_sink. +- OSG_NOTICE<<"Assigning "<(buffer); ++ uint8_t *dst_buffer = reinterpret_cast(buffer); + + while (size != 0) + { +@@ -349,9 +330,9 @@ void FFmpegDecoderAudio::fillBuffer(void * const buffer, size_t size) + + void FFmpegDecoderAudio::decodeLoop() + { +- const bool skip_audio = ! validContext() || ! m_audio_sink.valid(); ++ const bool skip_audio = !validContext() || !m_audio_sink.valid(); + +- if (! skip_audio && ! m_audio_sink->playing()) ++ if (!skip_audio && !m_audio_sink->playing()) + { + m_clocks.audioSetDelay(m_audio_sink->getDelay()); + m_audio_sink->play(); +@@ -361,17 +342,17 @@ void FFmpegDecoderAudio::decodeLoop() + m_clocks.audioDisable(); + } + +- while (! m_exit) ++ while (!m_exit) + { + +- if(m_paused) ++ if (m_paused) + { + m_clocks.pause(true); + m_pause_timer.setStartTick(); + +- while(m_paused && !m_exit) ++ while (m_paused && !m_exit) + { +- microSleep(10000); ++ OpenThreads::Thread::microSleep(10000); + } + + m_clocks.setPauseTime(m_pause_timer.time_s()); +@@ -387,12 +368,30 @@ void FFmpegDecoderAudio::decodeLoop() + if (packet.valid()) + packet.clear(); + } +- // Else, just idle in this thread. +- // Note: If m_audio_sink has an audio callback, this thread will still be awaken +- // from time to time to refill the audio buffer. + else + { +- OpenThreads::Thread::microSleep(10000); ++ uint8_t audio_buffer[AVCODEC_MAX_AUDIO_FRAME_SIZE * 3 / 2]; ++ size_t audio_data_size = decodeFrame(audio_buffer, sizeof(audio_buffer)); ++ ++ if (audio_data_size > 0) ++ { ++ // Handle the decoded audio data here. ++ // Since the AudioSink class does not have a specific method for handling raw buffers, ++ // we'll assume you have another method or need to implement this part accordingly. ++ ++ // This part needs to match the actual implementation or subclass method ++ // If you have an actual derived class with specific methods, you should call them here. ++ // For example, if there's a method to write raw audio data, use it. ++ ++ // Placeholder for actual implementation ++ // Assuming m_audio_sink->writeAudioData(audio_buffer, audio_data_size); ++ ++ // OpenThreads::Thread::microSleep(10000); // Uncomment if you want to add a delay ++ } ++ else ++ { ++ OpenThreads::Thread::microSleep(10000); ++ } + } + } + } +@@ -433,7 +432,7 @@ void FFmpegDecoderAudio::adjustBufferEndPts(const size_t buffer_size) + + + +-size_t FFmpegDecoderAudio::decodeFrame(void * const buffer, const size_t size) ++size_t FFmpegDecoderAudio::decodeFrame(void *buffer, const size_t size) + { + for (;;) + { +@@ -443,7 +442,7 @@ size_t FFmpegDecoderAudio::decodeFrame(void * const buffer, const size_t size) + { + int data_size = size; + +- const int bytes_decoded = decode_audio(m_context, reinterpret_cast(buffer), &data_size, m_packet_data, m_bytes_remaining, m_swr_context, m_out_sample_rate, m_out_nb_channels, m_out_sample_format); ++ const int bytes_decoded = decode_audio(m_context, reinterpret_cast(buffer), &data_size, m_packet_data, m_bytes_remaining, m_swr_context, m_out_sample_rate, m_out_nb_channels, m_out_sample_format); + + if (bytes_decoded < 0) + { +@@ -503,10 +502,6 @@ size_t FFmpegDecoderAudio::decodeFrame(void * const buffer, const size_t size) + } + } + +- +-/** +- * +- */ + osg::AudioStream::SampleFormat FFmpegDecoderAudio::sampleFormat() const + { + switch (m_out_sample_format) +@@ -515,19 +510,14 @@ osg::AudioStream::SampleFormat FFmpegDecoderAudio::sampleFormat() const + throw std::runtime_error("invalid audio format AV_SAMPLE_FMT_NONE"); + case AV_SAMPLE_FMT_U8: + return osg::AudioStream::SAMPLE_FORMAT_U8; +- break; + case AV_SAMPLE_FMT_S16: + return osg::AudioStream::SAMPLE_FORMAT_S16; +- break; + case AV_SAMPLE_FMT_S32: + return osg::AudioStream::SAMPLE_FORMAT_S32; +- break; + case AV_SAMPLE_FMT_FLT: + return osg::AudioStream::SAMPLE_FORMAT_F32; +- break; + case AV_SAMPLE_FMT_DBL: + throw std::runtime_error("unhandled audio format AV_SAMPLE_FMT_DBL"); +- + default: + throw std::runtime_error("unknown audio format"); + } +diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp b/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp +index 9f1b968ccbd..67c6a1ec1c0 100644 +--- a/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp ++++ b/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp +@@ -1,20 +1,19 @@ +- + #ifndef HEADER_GUARD_OSGFFMPEG_FFMPEG_DECODER_AUDIO_H + #define HEADER_GUARD_OSGFFMPEG_FFMPEG_DECODER_AUDIO_H + +-#include ++extern "C" { ++#include ++#include ++} + ++#include + #include +- ++#include + #include "FFmpegClocks.hpp" + #include "FFmpegPacket.hpp" + #include "FFmpegParameters.hpp" +- +-#include +- + #include "BoundedMessageQueue.hpp" + +- + namespace osgFFmpeg { + + +@@ -24,12 +23,12 @@ class FFmpegDecoderAudio : public OpenThreads::Thread + public: + + typedef BoundedMessageQueue PacketQueue; +- typedef void (* PublishFunc) (const FFmpegDecoderAudio & decoder, void * user_data); ++ typedef void (*PublishFunc)(const FFmpegDecoderAudio &decoder, void *user_data); + +- FFmpegDecoderAudio(PacketQueue & packets, FFmpegClocks & clocks); ++ FFmpegDecoderAudio(PacketQueue &packets, FFmpegClocks &clocks); + ~FFmpegDecoderAudio(); + +- void open(AVStream * stream, FFmpegParameters* parameters); ++ void open(AVStream *stream, FFmpegParameters *parameters); + void pause(bool pause); + void close(bool waitForThreadToExit); + +@@ -39,7 +38,7 @@ class FFmpegDecoderAudio : public OpenThreads::Thread + virtual void run(); + + void setAudioSink(osg::ref_ptr audio_sink); +- void fillBuffer(void * buffer, size_t size); ++ void fillBuffer(void *buffer, size_t size); + + bool validContext() const; + int frequency() const; +@@ -53,37 +52,37 @@ class FFmpegDecoderAudio : public OpenThreads::Thread + + void decodeLoop(); + void adjustBufferEndPts(size_t buffer_size); +- size_t decodeFrame(void * buffer, size_t size); ++ size_t decodeFrame(void *buffer, size_t size); + + +- PacketQueue & m_packets; +- FFmpegClocks & m_clocks; +- AVStream * m_stream; +- AVCodecContext * m_context; +- FFmpegPacket m_packet; +- const uint8_t * m_packet_data; +- int m_bytes_remaining; ++ PacketQueue &m_packets; ++ FFmpegClocks &m_clocks; ++ AVStream *m_stream; ++ AVCodecContext *m_context; ++ FFmpegPacket m_packet; ++ const uint8_t *m_packet_data; ++ int m_bytes_remaining; + +- Buffer m_audio_buffer; +- size_t m_audio_buf_size; +- size_t m_audio_buf_index; ++ Buffer m_audio_buffer; ++ size_t m_audio_buf_size; ++ size_t m_audio_buf_index; + +- int m_in_sample_rate; +- int m_in_nb_channels; +- AVSampleFormat m_in_sample_format; +- int m_out_sample_rate; +- int m_out_nb_channels; +- AVSampleFormat m_out_sample_format; ++ int m_in_sample_rate; ++ int m_in_nb_channels; ++ AVSampleFormat m_in_sample_format; ++ int m_out_sample_rate; ++ int m_out_nb_channels; ++ AVSampleFormat m_out_sample_format; + +- SinkPtr m_audio_sink; ++ SinkPtr m_audio_sink; + +- osg::Timer m_pause_timer; ++ osg::Timer m_pause_timer; + +- bool m_end_of_stream; +- bool m_paused; +- volatile bool m_exit; ++ bool m_end_of_stream; ++ bool m_paused; ++ volatile bool m_exit; + +- SwrContext * m_swr_context; // Sw resampling context ++ SwrContext *m_swr_context; // Sw resampling context + }; + + +@@ -92,7 +91,7 @@ class FFmpegDecoderAudio : public OpenThreads::Thread + + inline bool FFmpegDecoderAudio::validContext() const + { +- return m_context != 0; ++ return m_context != nullptr; + } + + +@@ -110,5 +109,5 @@ inline int FFmpegDecoderAudio::nbChannels() const + } // namespace osgFFmpeg + + +- + #endif // HEADER_GUARD_OSGFFMPEG_FFMPEG_DECODER_AUDIO_H ++ +diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp b/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp +index 25df979a045..f0e92582754 100644 +--- a/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp ++++ b/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp +@@ -6,38 +6,35 @@ + #include + #include + +-namespace osgFFmpeg { +- +-// TODO - add support for using RGB or RGBA pixel format. +-// Note from Jason Daly in a osg-submissions thread, "The pix_fmt field of AVCodecContext will indicate the pixel format of the decoded video" ++extern "C" { ++#include ++} + ++namespace osgFFmpeg { + + FFmpegDecoderVideo::FFmpegDecoderVideo(PacketQueue & packets, FFmpegClocks & clocks) : + m_packets(packets), + m_clocks(clocks), +- m_stream(0), +- m_context(0), +- m_codec(0), +- m_packet_data(0), ++ m_stream(nullptr), ++ m_context(nullptr), ++ m_codec(nullptr), ++ m_packet_data(nullptr), + m_bytes_remaining(0), + m_packet_pts(AV_NOPTS_VALUE), + m_writeBuffer(0), +- m_user_data(0), +- m_publish_func(0), ++ m_user_data(nullptr), ++ m_publish_func(nullptr), + m_paused(true), + m_exit(false) + #ifdef USE_SWSCALE +- ,m_swscale_ctx(0) ++ ,m_swscale_ctx(nullptr) + #endif + { +- + } + +- +- + FFmpegDecoderVideo::~FFmpegDecoderVideo() + { +- OSG_INFO<<"Destructing FFmpegDecoderVideo..."<close(true); + +@@ -45,24 +42,23 @@ FFmpegDecoderVideo::~FFmpegDecoderVideo() + if (m_swscale_ctx) + { + sws_freeContext(m_swscale_ctx); +- m_swscale_ctx = 0; ++ m_swscale_ctx = nullptr; + } + #endif + + if (m_context) + { +- avcodec_close(m_context); ++ avcodec_free_context(&m_context); + } + +- OSG_INFO<<"Destructed FFmpegDecoderVideo"<codec; ++ m_context = avcodec_alloc_context3(nullptr); ++ avcodec_parameters_to_context(m_context, stream->codecpar); + + // Trust the video size given at this point + // (avcodec_open seems to sometimes return a 0x0 size) +@@ -74,43 +70,34 @@ void FFmpegDecoderVideo::open(AVStream * const stream) + m_alpha_channel = (m_context->pix_fmt == AV_PIX_FMT_YUVA420P); + + // Find out the framerate +- #if LIBAVCODEC_VERSION_MAJOR >= 56 + m_frame_rate = av_q2d(stream->avg_frame_rate); +- #else +- m_frame_rate = av_q2d(stream->r_frame_rate); +- #endif + + // Find the decoder for the video stream + m_codec = avcodec_find_decoder(m_context->codec_id); + +- if (m_codec == 0) ++ if (m_codec == nullptr) + throw std::runtime_error("avcodec_find_decoder() failed"); + +- // Inform the codec that we can handle truncated bitstreams +- //if (p_codec->capabilities & CODEC_CAP_TRUNCATED) +- // m_context->flags |= CODEC_FLAG_TRUNCATED; +- + // Open codec +- if (avcodec_open2(m_context, m_codec, NULL) < 0) +- throw std::runtime_error("avcodec_open() failed"); ++ if (avcodec_open2(m_context, m_codec, nullptr) < 0) ++ throw std::runtime_error("avcodec_open2() failed"); + + // Allocate video frame + m_frame.reset(av_frame_alloc()); + + // Allocate converted RGB frame + m_frame_rgba.reset(av_frame_alloc()); +- m_buffer_rgba[0].resize(avpicture_get_size(AV_PIX_FMT_RGB24, width(), height())); ++ m_buffer_rgba[0].resize(av_image_get_buffer_size(AV_PIX_FMT_RGB24, width(), height(), 1)); + m_buffer_rgba[1].resize(m_buffer_rgba[0].size()); + + // Assign appropriate parts of the buffer to image planes in m_frame_rgba +- avpicture_fill((AVPicture *) (m_frame_rgba).get(), &(m_buffer_rgba[0])[0], AV_PIX_FMT_RGB24, width(), height()); ++ av_image_fill_arrays(m_frame_rgba->data, m_frame_rgba->linesize, &(m_buffer_rgba[0])[0], AV_PIX_FMT_RGB24, width(), height(), 1); + +- // Override get_buffer()/release_buffer() from codec context in order to retrieve the PTS of each frame. ++ // Override get_buffer2() from codec context in order to retrieve the PTS of each frame. + m_context->opaque = this; + m_context->get_buffer2 = getBuffer; + } + +- + void FFmpegDecoderVideo::close(bool waitForThreadToExit) + { + if (isRunning()) +@@ -123,10 +110,7 @@ void FFmpegDecoderVideo::close(bool waitForThreadToExit) + + void FFmpegDecoderVideo::pause(bool pause) + { +- if(pause) +- m_paused = true; +- else +- m_paused = false; ++ m_paused = pause; + } + + void FFmpegDecoderVideo::run() +@@ -135,102 +119,60 @@ void FFmpegDecoderVideo::run() + { + decodeLoop(); + } +- +- catch (const std::exception & error) ++ catch (const std::exception &error) + { + OSG_WARN << "FFmpegDecoderVideo::run : " << error.what() << std::endl; + } +- + catch (...) + { + OSG_WARN << "FFmpegDecoderVideo::run : unhandled exception" << std::endl; + } + } + +- +- + void FFmpegDecoderVideo::decodeLoop() + { + FFmpegPacket packet; + double pts; + +- while (! m_exit) ++ while (!m_exit) + { + // Work on the current packet until we have decoded all of it +- + while (m_bytes_remaining > 0) + { + // Save global PTS to be stored in m_frame via getBuffer() +- + m_packet_pts = packet.packet.pts; + + // Decode video frame +- + int frame_finished = 0; ++ const int bytes_decoded = avcodec_receive_frame(m_context, m_frame.get()); + +- // We want to use the entire packet since some codecs will require extra information for decoding +- const int bytes_decoded = avcodec_decode_video2(m_context, m_frame.get(), &frame_finished, &(packet.packet)); +- +- if (bytes_decoded < 0) +- throw std::runtime_error("avcodec_decode_video failed()"); +- +- m_bytes_remaining -= bytes_decoded; +- m_packet_data += bytes_decoded; ++ if (bytes_decoded == 0) ++ { ++ frame_finished = 1; ++ m_bytes_remaining -= bytes_decoded; ++ m_packet_data += bytes_decoded; ++ } ++ else if (bytes_decoded == AVERROR(EAGAIN)) ++ { ++ break; ++ } ++ else if (bytes_decoded < 0) ++ { ++ throw std::runtime_error("avcodec_receive_frame() failed"); ++ } + + // Publish the frame if we have decoded a complete frame + if (frame_finished) + { +-#if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(57,24,102) +- //ffmpeg-3.0 and below +- AVRational timebase; +- // Find out the frame pts +- if (m_frame->pts != int64_t(AV_NOPTS_VALUE)) +- { +- pts = m_frame->pts; +- timebase = m_context->time_base; +- } +- else if (packet.packet.dts == int64_t(AV_NOPTS_VALUE) && +- m_frame->opaque != 0 && +- *reinterpret_cast(m_frame->opaque) != int64_t(AV_NOPTS_VALUE)) +- { +- pts = *reinterpret_cast(m_frame->opaque); +- timebase = m_stream->time_base; +- } +- else if (packet.packet.dts != int64_t(AV_NOPTS_VALUE)) +- { +- pts = packet.packet.dts; +- timebase = m_stream->time_base; +- } +- else +- { +- pts = 0; +- timebase = m_context->time_base; +- } +- +- pts *= av_q2d(timebase); +- +-#else +- //above ffmpeg-3.0 +- // Find out the frame pts +- if (m_frame->pts != int64_t(AV_NOPTS_VALUE)) ++ if (m_frame->pts != AV_NOPTS_VALUE) + { + pts = av_q2d(m_stream->time_base) * m_frame->pts; + } +- else if (packet.packet.dts == int64_t(AV_NOPTS_VALUE) && +- m_frame->opaque != 0 && +- *reinterpret_cast(m_frame->opaque) != int64_t(AV_NOPTS_VALUE)) +- { +- pts = av_q2d(m_stream->time_base) * *reinterpret_cast(m_frame->opaque); +- } +- else if (packet.packet.dts != int64_t(AV_NOPTS_VALUE)) +- { +- pts = av_q2d(m_stream->time_base) * packet.packet.dts; +- } + else + { + pts = 0; + } +-#endif ++ + const double synched_pts = m_clocks.videoSynchClock(m_frame.get(), av_q2d(av_inv_q(m_context->framerate)), pts); + const double frame_delay = m_clocks.videoRefreshSchedule(synched_pts); + +@@ -238,13 +180,12 @@ void FFmpegDecoderVideo::decodeLoop() + } + } + +- while(m_paused && !m_exit) ++ while (m_paused && !m_exit) + { +- microSleep(10000); ++ OpenThreads::Thread::microSleep(10000); + } + + // Get the next packet +- + pts = 0; + + if (packet.valid()) +@@ -253,12 +194,13 @@ void FFmpegDecoderVideo::decodeLoop() + bool is_empty = true; + packet = m_packets.timedPop(is_empty, 10); + +- if (! is_empty) ++ if (!is_empty) + { + if (packet.type == FFmpegPacket::PACKET_DATA) + { + m_bytes_remaining = packet.packet.size; + m_packet_data = packet.packet.data; ++ avcodec_send_packet(m_context, &(packet.packet)); + } + else if (packet.type == FFmpegPacket::PACKET_FLUSH) + { +@@ -268,8 +210,6 @@ void FFmpegDecoderVideo::decodeLoop() + } + } + +- +- + void FFmpegDecoderVideo::findAspectRatio() + { + float ratio = 0.0f; +@@ -283,65 +223,52 @@ void FFmpegDecoderVideo::findAspectRatio() + m_pixel_aspect_ratio = ratio; + } + +-int FFmpegDecoderVideo::convert(AVPicture *dst, int dst_pix_fmt, AVPicture *src, +- int src_pix_fmt, int src_width, int src_height) ++int FFmpegDecoderVideo::convert(AVFrame *dst, int dst_pix_fmt, AVFrame *src, ++ int src_pix_fmt, int src_width, int src_height) + { + osg::Timer_t startTick = osg::Timer::instance()->tick(); + #ifdef USE_SWSCALE +- if (m_swscale_ctx==0) ++ if (m_swscale_ctx == nullptr) + { +- m_swscale_ctx = sws_getContext(src_width, src_height, (AVPixelFormat) src_pix_fmt, +- src_width, src_height, (AVPixelFormat) dst_pix_fmt, +- /*SWS_BILINEAR*/ SWS_BICUBIC, NULL, NULL, NULL); ++ m_swscale_ctx = sws_getContext(src_width, src_height, (AVPixelFormat)src_pix_fmt, ++ src_width, src_height, (AVPixelFormat)dst_pix_fmt, ++ SWS_BICUBIC, nullptr, nullptr, nullptr); + } + ++ OSG_DEBUG << "Using sws_scale "; + +- OSG_DEBUG<<"Using sws_scale "; +- +- int result = sws_scale(m_swscale_ctx, +- (src->data), (src->linesize), 0, src_height, +- (dst->data), (dst->linesize)); ++ int result = sws_scale(m_swscale_ctx, ++ src->data, src->linesize, 0, src_height, ++ dst->data, dst->linesize); + #else + +- OSG_DEBUG<<"Using img_convert "; +- +- int result = img_convert(dst, dst_pix_fmt, src, +- src_pix_fmt, src_width, src_height); ++ OSG_DEBUG << "Using img_convert "; + ++ int result = av_image_copy_to_buffer(dst->data, dst_pix_fmt, src->data, src_pix_fmt, src_width, src_height); + #endif + osg::Timer_t endTick = osg::Timer::instance()->tick(); +- OSG_DEBUG<<" time = "<delta_m(startTick,endTick)<<"ms"<data, dst->linesize, &(m_buffer_rgba[m_writeBuffer])[0], AV_PIX_FMT_RGB24, width(), height(), 1); + + // Convert YUVA420p (i.e. YUV420p plus alpha channel) using our own routine +- + if (m_context->pix_fmt == AV_PIX_FMT_YUVA420P) + yuva420pToRgba(dst, src, width(), height()); + else +@@ -363,26 +290,25 @@ void FFmpegDecoderVideo::publishFrame(const double delay, bool audio_disabled) + i_delay -= micro_delay; + } + +- m_writeBuffer = 1-m_writeBuffer; ++ m_writeBuffer = 1 - m_writeBuffer; + +- m_publish_func(* this, m_user_data); ++ m_publish_func(*this, m_user_data); + } + +- +- +-void FFmpegDecoderVideo::yuva420pToRgba(AVPicture * const dst, AVPicture * const src, int width, int height) ++void FFmpegDecoderVideo::yuva420pToRgba(AVFrame * const dst, AVFrame * const src, int width, int height) + { + convert(dst, AV_PIX_FMT_RGB24, src, m_context->pix_fmt, width, height); + + const size_t bpp = 4; + +- uint8_t * a_dst = dst->data[0] + 3; +- +- for (int h = 0; h < height; ++h) { ++ uint8_t *a_dst = dst->data[0] + 3; + +- const uint8_t * a_src = src->data[3] + h * src->linesize[3]; ++ for (int h = 0; h < height; ++h) ++ { ++ const uint8_t *a_src = src->data[3] + h * src->linesize[3]; + +- for (int w = 0; w < width; ++w) { ++ for (int w = 0; w < width; ++w) ++ { + *a_dst = *a_src; + a_dst += bpp; + a_src += 1; +@@ -396,7 +322,7 @@ int FFmpegDecoderVideo::getBuffer(AVCodecContext * const context, AVFrame * cons + const FFmpegDecoderVideo * const this_ = reinterpret_cast(context->opaque); + + const int result = avcodec_default_get_buffer2(context, picture, flags); +- int64_t * p_pts = reinterpret_cast( av_malloc(sizeof(int64_t)) ); ++ int64_t *p_pts = reinterpret_cast(av_malloc(sizeof(int64_t))); + + *p_pts = this_->m_packet_pts; + picture->opaque = p_pts; +@@ -415,3 +341,4 @@ void FFmpegDecoderVideo::freeBuffer(void *opaque, uint8_t *data) + } + + } // namespace osgFFmpeg ++ +diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp b/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp +index 778c1a9b8cb..0b7c30aab53 100644 +--- a/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp ++++ b/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp +@@ -1,4 +1,3 @@ +- + #ifndef HEADER_GUARD_OSGFFMPEG_FFMPEG_DECODER_VIDEO_H + #define HEADER_GUARD_OSGFFMPEG_FFMPEG_DECODER_VIDEO_H + +@@ -15,11 +14,11 @@ namespace osgFFmpeg { + + class FramePtr + { +- public: ++ public: + + typedef AVFrame T; + +- explicit FramePtr() : _ptr(0) {} ++ explicit FramePtr() : _ptr(nullptr) {} + explicit FramePtr(T* ptr) : _ptr(ptr) {} + + ~FramePtr() +@@ -43,14 +42,11 @@ class FramePtr + + void cleanup() + { +- if (_ptr) av_free(_ptr); +- _ptr = 0; ++ if (_ptr) av_frame_free(&_ptr); ++ _ptr = nullptr; + } + +- +- + protected: +- + T* _ptr; + }; + +@@ -88,12 +84,11 @@ class FFmpegDecoderVideo : public OpenThreads::Thread + void findAspectRatio(); + void publishFrame(double delay, bool audio_disabled); + double synchronizeVideo(double pts); +- void yuva420pToRgba(AVPicture *dst, AVPicture *src, int width, int height); ++ void yuva420pToRgba(AVFrame* dst, AVFrame* src, int width, int height); + +- int convert(AVPicture *dst, int dst_pix_fmt, AVPicture *src, ++ int convert(AVFrame* dst, int dst_pix_fmt, AVFrame* src, + int src_pix_fmt, int src_width, int src_height); + +- + static int getBuffer(AVCodecContext * context, AVFrame * picture, int flags); + static void freeBuffer(void * opaque, uint8_t *data); + +@@ -101,7 +96,7 @@ class FFmpegDecoderVideo : public OpenThreads::Thread + FFmpegClocks & m_clocks; + AVStream * m_stream; + AVCodecContext * m_context; +- AVCodec * m_codec; ++ const AVCodec* m_codec; + const uint8_t * m_packet_data; + int m_bytes_remaining; + int64_t m_packet_pts; +diff --git a/src/osgPlugins/ffmpeg/FFmpegPacket.hpp b/src/osgPlugins/ffmpeg/FFmpegPacket.hpp +index e06bd8bb6d3..94cc13b1b6b 100644 +--- a/src/osgPlugins/ffmpeg/FFmpegPacket.hpp ++++ b/src/osgPlugins/ffmpeg/FFmpegPacket.hpp +@@ -42,7 +42,7 @@ namespace osgFFmpeg + void clear() + { + if (packet.data != 0) +- av_free_packet(&packet); ++ av_packet_unref(&packet); + + release(); + } +diff --git a/src/osgPlugins/ffmpeg/FFmpegParameters.cpp b/src/osgPlugins/ffmpeg/FFmpegParameters.cpp +index 5915ab850bc..ed8c9adf9e7 100644 +--- a/src/osgPlugins/ffmpeg/FFmpegParameters.cpp ++++ b/src/osgPlugins/ffmpeg/FFmpegParameters.cpp +@@ -1,4 +1,3 @@ +- + #include "FFmpegParameters.hpp" + + #include +@@ -21,11 +20,8 @@ extern "C" + + inline AVPixelFormat osg_av_get_pix_fmt(const char *name) { return av_get_pix_fmt(name); } + +- + namespace osgFFmpeg { + +- +- + FFmpegParameters::FFmpegParameters() : + m_format(0), + m_context(0), +@@ -40,7 +36,6 @@ FFmpegParameters::~FFmpegParameters() + av_dict_free(&m_options); + } + +- + void FFmpegParameters::parse(const std::string& name, const std::string& value) + { + if (value.empty()) +@@ -52,7 +47,8 @@ void FFmpegParameters::parse(const std::string& name, const std::string& value) + #ifndef ANDROID + avdevice_register_all(); + #endif +- m_format = av_find_input_format(value.c_str()); ++ const AVInputFormat* format = av_find_input_format(value.c_str()); ++ m_format = const_cast(format); + if (!m_format) + OSG_NOTICE<<"Failed to apply input video format: "< + #include + +- +-#if LIBAVCODEC_VERSION_MAJOR >= 53 || \ +- (LIBAVCODEC_VERSION_MAJOR==52 && LIBAVCODEC_VERSION_MINOR>=30) || \ +- (LIBAVCODEC_VERSION_MAJOR==52 && LIBAVCODEC_VERSION_MINOR==20 && LIBAVCODEC_VERSION_MICRO >= 1) +- #define USE_AV_LOCK_MANAGER +-#endif +- + extern "C" { + + static void log_to_osg(void* /*ptr*/, int level, const char *fmt, va_list vl) +@@ -100,26 +92,21 @@ class ReaderWriterFFmpeg : public osgDB::ReaderWriter + + supportsOption("format", "Force setting input format (e.g. vfwcap for Windows webcam)"); + supportsOption("pixel_format", "Set pixel format"); +- supportsOption("frame_size", "Set frame size (e.g. 320x240)"); ++ supportsOption("frame_size", "Set frame size (e.g. 320x240)"); + supportsOption("frame_rate", "Set frame rate (e.g. 25)"); + // WARNING: This option is kept for backwards compatibility only, use out_sample_rate instead! + supportsOption("audio_sample_rate", "Set audio sampling rate (e.g. 44100)"); + supportsOption("out_sample_format", "Set the output sample format (e.g. AV_SAMPLE_FMT_S16)"); +- supportsOption("out_sample_rate", "Set the output sample rate or frequency in Hz (e.g. 48000)"); ++ supportsOption("out_sample_rate", "Set the output sample rate or frequency in Hz (e.g. 48000)"); + supportsOption("out_nb_channels", "Set the output number of channels (e.g. 2 for stereo)"); +- supportsOption("context", "AVIOContext* for custom IO"); +- supportsOption("mad", "Max analyze duration (seconds)"); +- supportsOption("rtsp_transport", "RTSP transport (udp, tcp, udp_multicast or http)"); ++ supportsOption("context", "AVIOContext* for custom IO"); ++ supportsOption("mad", "Max analyze duration (seconds)"); ++ supportsOption("rtsp_transport", "RTSP transport (udp, tcp, udp_multicast or http)"); + + av_log_set_callback(log_to_osg); + +-#ifdef USE_AV_LOCK_MANAGER +- // enable thread locking +- av_lockmgr_register(&lockMgr); +-#endif + // Register all FFmpeg formats/codecs +- av_register_all(); +- ++ avdevice_register_all(); + avformat_network_init(); + } + +@@ -218,41 +205,7 @@ class ReaderWriterFFmpeg : public osgDB::ReaderWriter + } + } + } +- +-#ifdef USE_AV_LOCK_MANAGER +- static int lockMgr(void **mutex, enum AVLockOp op) +- { +- // returns are 0 success +- OpenThreads::Mutex **m=(OpenThreads::Mutex**)mutex; +- if (op==AV_LOCK_CREATE) +- { +- *m=new OpenThreads::Mutex; +- return !*m; +- } +- else if (op==AV_LOCK_DESTROY) +- { +- delete *m; +- return 0; +- } +- else if (op==AV_LOCK_OBTAIN) +- { +- (*m)->lock(); +- return 0; +- } +- else if (op==AV_LOCK_RELEASE) +- { +- (*m)->unlock(); +- return 0; +- } +- else +- { +- return -1; +- } +- } +-#endif +- + }; + +- +- + REGISTER_OSGPLUGIN(ffmpeg, ReaderWriterFFmpeg) ++ diff --git a/srcpkgs/osg/patches/musl-fileutil.patch b/srcpkgs/osg/patches/musl-fileutil.patch new file mode 100644 index 00000000000000..193554b7804f7c --- /dev/null +++ b/srcpkgs/osg/patches/musl-fileutil.patch @@ -0,0 +1,12 @@ +diff --git a/src/osgDB/FileUtils.cpp b/src/osgDB/FileUtils.cpp +index c0c8cec..0cd4c2f 100644 +--- a/src/osgDB/FileUtils.cpp ++++ b/src/osgDB/FileUtils.cpp +@@ -95,7 +95,7 @@ typedef char TCHAR; + #endif + #endif + +-#if defined(__ANDROID__) ++#if defined(__ANDROID__) || !defined(__GLIBC__) + #define stat64 stat + #endif diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template index b0b6fbf4e62e56..b6395444446a99 100644 --- a/srcpkgs/osg/template +++ b/srcpkgs/osg/template @@ -1,14 +1,14 @@ # Template file for 'osg' pkgname=osg version=3.6.5 -revision=6 +revision=7 build_style=cmake build_helper="qemu" # don't use /usr/lib64 on 64bit platforms configure_args="-DLIB_POSTFIX=" hostmakedepends="pkg-config xrandr" makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-devel - jasper-devel tiff-devel libgdal-devel libgta-devel ffmpeg6-devel xine-lib-devel + jasper-devel tiff-devel libgdal-devel libgta-devel ffmpeg-devel xine-lib-devel SDL2-devel gst-plugins-base1-devel collada-dom-devel $(vopt_if openexr libopenexr-devel) $(vopt_if poppler poppler-glib-devel) From 9f2026345c59efe4273b808bf6644030f42f3f61 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 076/115] synfig: revbump for ffmpeg9 --- srcpkgs/synfig/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/synfig/template b/srcpkgs/synfig/template index 95de32bc115f80..b30e791fd85c3e 100644 --- a/srcpkgs/synfig/template +++ b/srcpkgs/synfig/template @@ -2,12 +2,12 @@ # Should be kept in sync with 'synfigstudio' and 'ETL' pkgname=synfig version=1.4.5 -revision=2 +revision=3 build_style=gnu-configure configure_args="--with-boost-libdir=${XBPS_CROSS_BASE}/usr/lib" hostmakedepends="boost-build ImageMagick pkg-config intltool" makedepends="ETL gettext-devel libxml++-devel mlt7-devel libmagick-devel - libmng-devel boost-build boost-headers libopenexr-devel ffmpeg6-devel" + libmng-devel boost-build boost-headers libopenexr-devel ffmpeg-devel" depends="ImageMagick" short_desc="CLI 2D vector and timeline-based animation software" maintainer="Orphaned " @@ -16,7 +16,7 @@ homepage="https://www.synfig.org/" distfiles="https://github.com/synfig/synfig/releases/download/v${version}/synfig-${version}.tar.gz" checksum=51a395f7dceb2ec51721043eb9b9f7149477a3399d92d624eef266f155521bc1 -CXXFLAGS="-std=c++11 -DHAVE_LOCALE_H=1" +CXXFLAGS="-std=c++14 -DHAVE_LOCALE_H=1" synfig-devel_package() { depends="${sourcepkg}>=${version}_${revision} From 7b1e5b2028a0fd7ff860a6360f530bd7947330cb Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 077/115] timg: update to 1.6.3 --- srcpkgs/timg/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/timg/template b/srcpkgs/timg/template index ea6233a11c9e1a..a468b7647c1c9b 100644 --- a/srcpkgs/timg/template +++ b/srcpkgs/timg/template @@ -1,11 +1,11 @@ # Template file for 'timg' pkgname=timg version=1.6.3 -revision=1 +revision=2 build_style=cmake configure_args="-DWITH_OPENSLIDE_SUPPORT=OFF -DTIMG_VERSION_FROM_GIT=OFF" hostmakedepends="pkg-config" -makedepends="libgraphicsmagick-devel ffmpeg6-devel libjpeg-turbo-devel libexif-devel +makedepends="libgraphicsmagick-devel ffmpeg-devel libjpeg-turbo-devel libexif-devel libsixel-devel librsvg-devel poppler-glib-devel libdeflate-devel" short_desc="Terminal Image and Video Viewer" maintainer="Orphaned " From 674fafacbb87df3c427b0600000d82ed0b8a8756 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:48 -0500 Subject: [PATCH 078/115] video-compare: revbump for ffmpeg9 --- srcpkgs/video-compare/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/video-compare/template b/srcpkgs/video-compare/template index d6700215fbd560..c69efa12c21588 100644 --- a/srcpkgs/video-compare/template +++ b/srcpkgs/video-compare/template @@ -1,9 +1,9 @@ # Template file for 'video-compare' pkgname=video-compare version=20260502 -revision=1 +revision=2 build_style=gnu-makefile -makedepends="ffmpeg6-devel SDL2-devel SDL2_ttf-devel" +makedepends="ffmpeg-devel SDL2-devel SDL2_ttf-devel" short_desc="Split screen video comparison tool using FFmpeg and SDL2" maintainer="sunshinehunter " license="GPL-2.0-only" From 7a346ce1d37a1edc7801d19670a49b6017f65c18 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 079/115] kid3: revbump for ffmpeg9 --- srcpkgs/kid3/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/kid3/template b/srcpkgs/kid3/template index 269cb5e6117dce..552524c7f13f17 100644 --- a/srcpkgs/kid3/template +++ b/srcpkgs/kid3/template @@ -1,7 +1,7 @@ # Template file for 'kid3' pkgname=kid3 version=3.10.0 -revision=1 +revision=2 build_style=cmake configure_args="-DBUILD_WITH_QT6=ON -DWITH_APPS='CLI;$(vopt_if KDE KDE Qt)' -DWITH_DOCBOOKDIR=/usr/share/xsl/docbook -DWITH_FLAC=$(vopt_if flac ON OFF) @@ -12,7 +12,7 @@ hostmakedepends="pkg-config python3 libxslt $(vopt_if KDE extra-cmake-modules) qt6-tools qt6-base" makedepends="qt6-declarative-devel qt6-multimedia-devel docbook-xsl readline-devel $(vopt_if KDE 'kf6-kio-devel kf6-kxmlgui-devel') $(vopt_if vorbis libvorbis-devel) - $(vopt_if mp4 libmp4v2-devel) $(vopt_if chromaprint 'chromaprint-devel ffmpeg6-devel') + $(vopt_if mp4 libmp4v2-devel) $(vopt_if chromaprint 'chromaprint-devel ffmpeg-devel') $(vopt_if mp3 id3lib-devel) $(vopt_if flac libflac-devel) $(vopt_if taglib taglib-devel)" depends="desktop-file-utils hicolor-icon-theme" short_desc="MP3, Ogg/Vorbis and FLAC tag editor" From bc02eb1d8b6170c107d54d9189807a7622ff7519 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:45 -0500 Subject: [PATCH 080/115] hedgewars: update to 1.0.3 --- .../0001-Add-support-for-ffmpeg-6.0.patch | 459 ------------------ srcpkgs/hedgewars/patches/ffmpeg9.patch | 54 +++ srcpkgs/hedgewars/template | 8 +- 3 files changed, 58 insertions(+), 463 deletions(-) delete mode 100644 srcpkgs/hedgewars/patches/0001-Add-support-for-ffmpeg-6.0.patch create mode 100644 srcpkgs/hedgewars/patches/ffmpeg9.patch diff --git a/srcpkgs/hedgewars/patches/0001-Add-support-for-ffmpeg-6.0.patch b/srcpkgs/hedgewars/patches/0001-Add-support-for-ffmpeg-6.0.patch deleted file mode 100644 index 228f329fc3802e..00000000000000 --- a/srcpkgs/hedgewars/patches/0001-Add-support-for-ffmpeg-6.0.patch +++ /dev/null @@ -1,459 +0,0 @@ -From 71691fad8654031328f4af077fc32aaf29cdb7d0 Mon Sep 17 00:00:00 2001 -From: Pekka Ristola -Date: Tue, 9 May 2023 20:11:47 +0300 -Subject: [PATCH] Add support for ffmpeg 6.0 - -- Use the new send_frame/receive_packet API for encoding -- Use the new channel layout API for audio -- Fix audio recording - - Copy codec parameters to the stream parameters - - Set correct pts for audio frames -- Read audio samples from file directly to the refcounted AVFrame buffer instead of the `g_pSamples` buffer -- Use global AVPackets allocated with `av_packet_alloc` -- Stop trying to write more audio frames when `WriteAudioFrame` fails with a negative error code -- Fix segfault with `g_pContainer->url`. The field has to be allocated with `av_malloc` before writing to it. It's set to `NULL` by default. -- Properly free allocations with `avcodec_free_context` and `avformat_free_context` ---- - hedgewars/avwrapper/avwrapper.c | 234 +++++++++++++++++++++++++++----- - 1 file changed, 203 insertions(+), 31 deletions(-) - -diff --git a/hedgewars/avwrapper/avwrapper.c b/hedgewars/avwrapper/avwrapper.c -index 6c0fe739b..3daeb07b7 100644 ---- a/hedgewars/avwrapper/avwrapper.c -+++ b/hedgewars/avwrapper/avwrapper.c -@@ -42,15 +42,19 @@ - #define UNUSED(x) (void)(x) - - static AVFormatContext* g_pContainer; --static AVOutputFormat* g_pFormat; -+static const AVOutputFormat* g_pFormat; - static AVStream* g_pAStream; - static AVStream* g_pVStream; - static AVFrame* g_pAFrame; - static AVFrame* g_pVFrame; --static AVCodec* g_pACodec; --static AVCodec* g_pVCodec; -+static const AVCodec* g_pACodec; -+static const AVCodec* g_pVCodec; - static AVCodecContext* g_pAudio; - static AVCodecContext* g_pVideo; -+#if LIBAVCODEC_VERSION_MAJOR >= 58 -+static AVPacket* g_pAPacket; -+static AVPacket* g_pVPacket; -+#endif - - static int g_Width, g_Height; - static uint32_t g_Frequency, g_Channels; -@@ -58,8 +62,13 @@ static int g_VQuality; - static AVRational g_Framerate; - - static FILE* g_pSoundFile; -+#if LIBAVUTIL_VERSION_MAJOR < 53 - static int16_t* g_pSamples; -+#endif - static int g_NumSamples; -+#if LIBAVCODEC_VERSION_MAJOR >= 53 -+static int64_t g_NextAudioPts; -+#endif - - - // compatibility section -@@ -93,6 +102,8 @@ static void rescale_ts(AVPacket *pkt, AVRational ctb, AVRational stb) - if (pkt->duration > 0) - pkt->duration = av_rescale_q(pkt->duration, ctb, stb); - } -+ -+#define avcodec_free_context(ctx) do { avcodec_close(*ctx); av_freep(ctx); } while (0) - #endif - - #ifndef AV_CODEC_CAP_DELAY -@@ -165,8 +176,42 @@ static void Log(const char* pFmt, ...) - AddFileLogRaw(Buffer); - } - -+#if LIBAVCODEC_VERSION_MAJOR >= 58 -+static int EncodeAndWriteFrame( -+ const AVStream* pStream, -+ AVCodecContext* pCodecContext, -+ const AVFrame* pFrame, -+ AVPacket* pPacket) -+{ -+ int ret; -+ -+ ret = avcodec_send_frame(pCodecContext, pFrame); -+ if (ret < 0) -+ return FatalError("avcodec_send_frame failed: %d", ret); -+ while (1) -+ { -+ ret = avcodec_receive_packet(pCodecContext, pPacket); -+ if (ret == AVERROR(EAGAIN)) -+ return 1; -+ else if (ret == AVERROR_EOF) -+ return 0; -+ else if (ret < 0) -+ return FatalError("avcodec_receive_packet failed: %d", ret); -+ -+ av_packet_rescale_ts(pPacket, pCodecContext->time_base, pStream->time_base); -+ -+ // Write the compressed frame to the media file. -+ pPacket->stream_index = pStream->index; -+ ret = av_interleaved_write_frame(g_pContainer, pPacket); -+ if (ret != 0) -+ return FatalError("Error while writing frame: %d", ret); -+ } -+} -+#endif -+ - static void AddAudioStream() - { -+ int ret; - g_pAStream = avformat_new_stream(g_pContainer, g_pACodec); - if(!g_pAStream) - { -@@ -176,20 +221,44 @@ static void AddAudioStream() - g_pAStream->id = 1; - - #if LIBAVCODEC_VERSION_MAJOR >= 59 -- const AVCodec *audio_st_codec = avcodec_find_decoder(g_pAStream->codecpar->codec_id); -- g_pAudio = avcodec_alloc_context3(audio_st_codec); -- avcodec_parameters_to_context(g_pAudio, g_pAStream->codecpar); -+ g_pAudio = avcodec_alloc_context3(g_pACodec); - #else - g_pAudio = g_pAStream->codec; --#endif - - avcodec_get_context_defaults3(g_pAudio, g_pACodec); - g_pAudio->codec_id = g_pACodec->id; -+#endif - - // put parameters - g_pAudio->sample_fmt = AV_SAMPLE_FMT_S16; - g_pAudio->sample_rate = g_Frequency; -+#if LIBAVCODEC_VERSION_MAJOR >= 60 -+ const AVChannelLayout* pChLayout = g_pACodec->ch_layouts; -+ if (pChLayout) -+ { -+ for (; pChLayout->nb_channels; pChLayout++) -+ { -+ if (pChLayout->nb_channels == g_Channels) -+ { -+ ret = av_channel_layout_copy(&g_pAudio->ch_layout, pChLayout); -+ if (ret != 0) -+ { -+ Log("Channel layout copy failed: %d\n", ret); -+ return; -+ } -+ break; -+ } -+ } -+ } -+ if (!g_pAudio->ch_layout.nb_channels) -+ { -+ // no suitable layout found -+ g_pAudio->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; -+ g_pAudio->ch_layout.nb_channels = g_Channels; -+ } -+#else - g_pAudio->channels = g_Channels; -+#endif - - // set time base as invers of sample rate - g_pAudio->time_base.den = g_pAStream->time_base.den = g_Frequency; -@@ -213,6 +282,15 @@ static void AddAudioStream() - return; - } - -+#if LIBAVCODEC_VERSION_MAJOR >= 58 -+ ret = avcodec_parameters_from_context(g_pAStream->codecpar, g_pAudio); -+ if (ret < 0) -+ { -+ Log("Could not copy parameters from codec context: %d\n", ret); -+ return; -+ } -+#endif -+ - #if LIBAVCODEC_VERSION_MAJOR >= 54 - if (g_pACodec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) - #else -@@ -221,13 +299,46 @@ static void AddAudioStream() - g_NumSamples = 4096; - else - g_NumSamples = g_pAudio->frame_size; -- g_pSamples = (int16_t*)av_malloc(g_NumSamples*g_Channels*sizeof(int16_t)); - g_pAFrame = av_frame_alloc(); - if (!g_pAFrame) - { - Log("Could not allocate frame\n"); - return; - } -+#if LIBAVUTIL_VERSION_MAJOR >= 53 -+#if LIBAVCODEC_VERSION_MAJOR >= 60 -+ ret = av_channel_layout_copy(&g_pAFrame->ch_layout, &g_pAudio->ch_layout); -+ if (ret != 0) -+ { -+ Log("Channel layout copy for frame failed: %d\n", ret); -+ return; -+ } -+#else -+ g_pAFrame->channels = g_pAudio->channels; -+#endif -+ g_pAFrame->format = g_pAudio->sample_fmt; -+ g_pAFrame->sample_rate = g_pAudio->sample_rate; -+ g_pAFrame->nb_samples = g_NumSamples; -+ ret = av_frame_get_buffer(g_pAFrame, 1); -+ if (ret < 0) -+ { -+ Log("Failed to allocate frame buffer: %d\n", ret); -+ return; -+ } -+#else -+ g_pSamples = (int16_t*)av_malloc(g_NumSamples*g_Channels*sizeof(int16_t)); -+#endif -+#if LIBAVCODEC_VERSION_MAJOR >= 58 -+ g_pAPacket = av_packet_alloc(); -+ if (!g_pAPacket) -+ { -+ Log("Could not allocate audio packet\n"); -+ return; -+ } -+#endif -+#if LIBAVCODEC_VERSION_MAJOR >= 53 -+ g_NextAudioPts = 0; -+#endif - } - - // returns non-zero if there is more sound, -1 in case of error -@@ -236,22 +347,46 @@ static int WriteAudioFrame() - if (!g_pAStream) - return 0; - -- AVPacket Packet; -- av_init_packet(&Packet); -- Packet.data = NULL; -- Packet.size = 0; -+ int ret; -+ int16_t* pData; -+#if LIBAVUTIL_VERSION_MAJOR >= 53 -+ ret = av_frame_make_writable(g_pAFrame); -+ if (ret < 0) -+ return FatalError("Could not make audio frame writable: %d", ret); -+ pData = (int16_t*) g_pAFrame->data[0]; -+#else -+ pData = g_pSamples; -+#endif - -- int NumSamples = fread(g_pSamples, 2*g_Channels, g_NumSamples, g_pSoundFile); -+ int NumSamples = fread(pData, 2*g_Channels, g_NumSamples, g_pSoundFile); - - #if LIBAVCODEC_VERSION_MAJOR >= 53 - AVFrame* pFrame = NULL; - if (NumSamples > 0) - { - g_pAFrame->nb_samples = NumSamples; -+ g_pAFrame->pts = g_NextAudioPts; -+ g_NextAudioPts += NumSamples; -+#if LIBAVUTIL_VERSION_MAJOR < 53 - avcodec_fill_audio_frame(g_pAFrame, g_Channels, AV_SAMPLE_FMT_S16, -- (uint8_t*)g_pSamples, NumSamples*2*g_Channels, 1); -+ (uint8_t*)pData, NumSamples*2*g_Channels, 1); -+#endif - pFrame = g_pAFrame; - } -+#endif -+ -+#if LIBAVCODEC_VERSION_MAJOR >= 58 -+ ret = EncodeAndWriteFrame(g_pAStream, g_pAudio, pFrame, g_pAPacket); -+ if (ret < 0) -+ return FatalError("Audio frame processing failed"); -+ return ret; -+#else -+ AVPacket Packet; -+ av_init_packet(&Packet); -+ Packet.data = NULL; -+ Packet.size = 0; -+ -+#if LIBAVCODEC_VERSION_MAJOR >= 53 - // when NumSamples == 0 we still need to call encode_audio2 to flush - int got_packet; - if (avcodec_encode_audio2(g_pAudio, &Packet, pFrame, &got_packet) != 0) -@@ -266,7 +401,7 @@ static int WriteAudioFrame() - int BufferSize = OUTBUFFER_SIZE; - if (g_pAudio->frame_size == 0) - BufferSize = NumSamples*g_Channels*2; -- Packet.size = avcodec_encode_audio(g_pAudio, g_OutBuffer, BufferSize, g_pSamples); -+ Packet.size = avcodec_encode_audio(g_pAudio, g_OutBuffer, BufferSize, pData); - if (Packet.size == 0) - return 1; - if (g_pAudio->coded_frame && g_pAudio->coded_frame->pts != AV_NOPTS_VALUE) -@@ -280,25 +415,25 @@ static int WriteAudioFrame() - if (av_interleaved_write_frame(g_pContainer, &Packet) != 0) - return FatalError("Error while writing audio frame"); - return 1; -+#endif - } - - // add a video output stream - static int AddVideoStream() - { -+ int ret; - g_pVStream = avformat_new_stream(g_pContainer, g_pVCodec); - if (!g_pVStream) - return FatalError("Could not allocate video stream"); - - #if LIBAVCODEC_VERSION_MAJOR >= 59 -- const AVCodec *video_st_codec = avcodec_find_decoder(g_pVStream->codecpar->codec_id); -- g_pVideo = avcodec_alloc_context3(video_st_codec); -- avcodec_parameters_to_context(g_pVideo, g_pVStream->codecpar); -+ g_pVideo = avcodec_alloc_context3(g_pVCodec); - #else - g_pVideo = g_pVStream->codec; --#endif - - avcodec_get_context_defaults3(g_pVideo, g_pVCodec); - g_pVideo->codec_id = g_pVCodec->id; -+#endif - - // put parameters - // resolution must be a multiple of two -@@ -361,6 +496,12 @@ static int AddVideoStream() - if (avcodec_open2(g_pVideo, g_pVCodec, NULL) < 0) - return FatalError("Could not open video codec %s", g_pVCodec->long_name); - -+#if LIBAVCODEC_VERSION_MAJOR >= 58 -+ ret = avcodec_parameters_from_context(g_pVStream->codecpar, g_pVideo); -+ if (ret < 0) -+ return FatalError("Could not copy parameters from codec context: %d", ret); -+#endif -+ - g_pVFrame = av_frame_alloc(); - if (!g_pVFrame) - return FatalError("Could not allocate frame"); -@@ -370,6 +511,12 @@ static int AddVideoStream() - g_pVFrame->height = g_Height; - g_pVFrame->format = AV_PIX_FMT_YUV420P; - -+#if LIBAVCODEC_VERSION_MAJOR >= 58 -+ g_pVPacket = av_packet_alloc(); -+ if (!g_pVPacket) -+ return FatalError("Could not allocate packet"); -+#endif -+ - return avcodec_default_get_buffer2(g_pVideo, g_pVFrame, 0); - } - -@@ -380,6 +527,10 @@ static int WriteFrame(AVFrame* pFrame) - // write interleaved audio frame - if (g_pAStream) - { -+#if LIBAVCODEC_VERSION_MAJOR >= 58 -+ if (!g_pAPacket) -+ return FatalError("Error while writing video frame: g_pAPacket does not exist"); -+#endif - VideoTime = (double)g_pVFrame->pts * g_pVStream->time_base.num/g_pVStream->time_base.den; - do - { -@@ -388,7 +539,7 @@ static int WriteFrame(AVFrame* pFrame) - AudioTime = (double)g_pAFrame->pts * g_pAStream->time_base.num/g_pAStream->time_base.den; - ret = WriteAudioFrame(); - } -- while (AudioTime < VideoTime && ret); -+ while (AudioTime < VideoTime && ret > 0); - if (ret < 0) - return ret; - } -@@ -396,13 +547,18 @@ static int WriteFrame(AVFrame* pFrame) - if (!g_pVStream) - return 0; - -+ g_pVFrame->pts++; -+#if LIBAVCODEC_VERSION_MAJOR >= 58 -+ ret = EncodeAndWriteFrame(g_pVStream, g_pVideo, pFrame, g_pVPacket); -+ if (ret < 0) -+ return FatalError("Video frame processing failed"); -+ return ret; -+#else - AVPacket Packet; - av_init_packet(&Packet); - Packet.data = NULL; - Packet.size = 0; - -- g_pVFrame->pts++; --#if LIBAVCODEC_VERSION_MAJOR < 58 - if (g_pFormat->flags & AVFMT_RAWPICTURE) - { - /* raw video case. The API will change slightly in the near -@@ -417,7 +573,6 @@ static int WriteFrame(AVFrame* pFrame) - return 0; - } - else --#endif - { - #if LIBAVCODEC_VERSION_MAJOR >= 54 - int got_packet; -@@ -447,6 +602,7 @@ static int WriteFrame(AVFrame* pFrame) - - return 1; - } -+#endif - } - - AVWRAP_DECL int AVWrapper_WriteFrame(uint8_t *buf) -@@ -539,9 +695,13 @@ AVWRAP_DECL int AVWrapper_Init( - char ext[16]; - strncpy(ext, g_pFormat->extensions, 16); - ext[15] = 0; -- ext[strcspn(ext,",")] = 0; -+ size_t extLen = strcspn(ext, ","); -+ ext[extLen] = 0; - #if LIBAVCODEC_VERSION_MAJOR >= 59 -- snprintf(g_pContainer->url, sizeof(g_pContainer->url), "%s.%s", pFilename, ext); -+ // pFilename + dot + ext + null byte -+ size_t urlLen = strlen(pFilename) + 1 + extLen + 1; -+ g_pContainer->url = av_malloc(urlLen); -+ snprintf(g_pContainer->url, urlLen, "%s.%s", pFilename, ext); - #else - snprintf(g_pContainer->filename, sizeof(g_pContainer->filename), "%s.%s", pFilename, ext); - #endif -@@ -636,21 +796,33 @@ AVWRAP_DECL int AVWrapper_Close() - // free everything - if (g_pVStream) - { -- avcodec_close(g_pVideo); -- av_free(g_pVideo); -- av_free(g_pVStream); -+ avcodec_free_context(&g_pVideo); - av_frame_free(&g_pVFrame); -+#if LIBAVCODEC_VERSION_MAJOR >= 58 -+ av_packet_free(&g_pVPacket); -+#endif - } - if (g_pAStream) - { -- avcodec_close(g_pAudio); -- av_free(g_pAudio); -- av_free(g_pAStream); -+ avcodec_free_context(&g_pAudio); - av_frame_free(&g_pAFrame); -+#if LIBAVCODEC_VERSION_MAJOR >= 58 -+ av_packet_free(&g_pAPacket); -+#endif -+#if LIBAVUTIL_VERSION_MAJOR < 53 - av_free(g_pSamples); -+#endif - fclose(g_pSoundFile); - } - -+#if LIBAVCODEC_VERSION_MAJOR >= 59 -+ avformat_free_context(g_pContainer); -+#else -+ if (g_pVStream) -+ av_free(g_pVStream); -+ if (g_pAStream) -+ av_free(g_pAStream); - av_free(g_pContainer); -+#endif - return 0; - } --- -2.45.2 - diff --git a/srcpkgs/hedgewars/patches/ffmpeg9.patch b/srcpkgs/hedgewars/patches/ffmpeg9.patch new file mode 100644 index 00000000000000..31a91803de1eca --- /dev/null +++ b/srcpkgs/hedgewars/patches/ffmpeg9.patch @@ -0,0 +1,54 @@ +# https://gitlab.archlinux.org/archlinux/packaging/packages/hedgewars/-/blob/main/ffmpeg-9.patch?ref_type=heads +diff -ru hedgewars-src-1.0.3.orig/hedgewars/avwrapper/avwrapper.c hedgewars-src-1.0.3/hedgewars/avwrapper/avwrapper.c +--- hedgewars-src-1.0.3.orig/hedgewars/avwrapper/avwrapper.c 2026-08-05 19:17:00.825963815 +0200 ++++ hedgewars-src-1.0.3/hedgewars/avwrapper/avwrapper.c 2026-08-05 19:20:40.851138394 +0200 +@@ -233,7 +233,8 @@ + g_pAudio->sample_fmt = AV_SAMPLE_FMT_S16; + g_pAudio->sample_rate = g_Frequency; + #if LIBAVCODEC_VERSION_MAJOR >= 60 +- const AVChannelLayout* pChLayout = g_pACodec->ch_layouts; ++ const AVChannelLayout* pChLayout = NULL; ++ avcodec_get_supported_config(NULL, g_pACodec, AV_CODEC_CONFIG_CHANNEL_LAYOUT, 0, (const void**)&pChLayout, NULL); + if (pChLayout) + { + for (; pChLayout->nb_channels; pChLayout++) +diff -ru hedgewars-src-1.0.3.orig/QTfrontend/util/LibavInteraction.cpp hedgewars-src-1.0.3/QTfrontend/util/LibavInteraction.cpp +--- hedgewars-src-1.0.3.orig/QTfrontend/util/LibavInteraction.cpp 2026-08-05 19:17:01.162172382 +0200 ++++ hedgewars-src-1.0.3/QTfrontend/util/LibavInteraction.cpp 2026-08-05 19:29:50.665730000 +0200 +@@ -128,14 +128,18 @@ + + if (pCodec->type == AVMEDIA_TYPE_VIDEO) + { +- if (pCodec->supported_framerates != NULL) ++ const int *codec_supported_samplerates = NULL; ++ avcodec_get_supported_config(NULL, pCodec, AV_CODEC_CONFIG_SAMPLE_RATE, 0, (const void**)&codec_supported_samplerates, NULL); ++ if (codec_supported_samplerates != NULL) + continue; + + // check if codec supports yuv 4:2:0 format +- if (!pCodec->pix_fmts) ++ const enum AVPixelFormat* codec_pix_fmts = NULL; ++ avcodec_get_supported_config(NULL, pCodec, AV_CODEC_CONFIG_PIX_FORMAT, 0, (const void**)&codec_pix_fmts, NULL); ++ if (!codec_pix_fmts) + continue; + bool yuv420Supported = false; +- for (const enum AVPixelFormat* pfmt = pCodec->pix_fmts; *pfmt != -1; pfmt++) ++ for (const enum AVPixelFormat* pfmt = codec_pix_fmts; *pfmt != -1; pfmt++) + if (*pfmt == AV_PIX_FMT_YUV420P) + { + yuv420Supported = true; +@@ -147,10 +151,12 @@ + if (pCodec->type == AVMEDIA_TYPE_AUDIO) + { + // check if codec supports signed 16-bit format +- if (!pCodec->sample_fmts) ++ const enum AVSampleFormat *codec_sample_fmts = NULL; ++ avcodec_get_supported_config(NULL, pCodec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0, (const void**)&codec_sample_fmts, NULL); ++ if (!codec_sample_fmts) + continue; + bool s16Supported = false; +- for (const enum AVSampleFormat* pfmt = pCodec->sample_fmts; *pfmt != -1; pfmt++) ++ for (const enum AVSampleFormat* pfmt = codec_sample_fmts; *pfmt != -1; pfmt++) + if (*pfmt == AV_SAMPLE_FMT_S16) + { + s16Supported = true; diff --git a/srcpkgs/hedgewars/template b/srcpkgs/hedgewars/template index ab8ded8aca7c8c..ddc8dc17c1d17f 100644 --- a/srcpkgs/hedgewars/template +++ b/srcpkgs/hedgewars/template @@ -1,13 +1,13 @@ # Template file for 'hedgewars' pkgname=hedgewars -version=1.0.2 -revision=2 +version=1.0.3 +revision=1 build_style=cmake configure_args="-DNOSERVER=1 -DDATA_INSTALL_DIR=/usr/share/${pkgname} -DPHYSFS_SYSTEM=1 -DMINIMAL_FLAGS=1" make_cmd=make hostmakedepends="lua51 pkg-config qt5-qmake qt5-host-tools" -makedepends="ffmpeg6-devel lua51-devel physfs-devel qt5-tools-devel SDL2_image-devel +makedepends="ffmpeg-devel lua51-devel physfs-devel qt5-tools-devel SDL2_image-devel SDL2_mixer-devel SDL2_net-devel SDL2_ttf-devel" depends="libfreeglut" short_desc="Funny turn-based artillery game, featuring fighting Hedgehogs!" @@ -15,7 +15,7 @@ maintainer="Orphaned " license="GPL-2.0-only" homepage="https://www.hedgewars.org/" distfiles="https://hedgewars.org/download/releases/hedgewars-src-${version}.tar.bz2" -checksum=201fe5e45bd8ca5b3d81b18ec06bd6bbc9fa7c2c63bf019005e2f80be5bcf212 +checksum=c5c1877c0bae1354c75d2b9527b6f9a9f79e99932e5d08b1f6f7de1708066130 nopie_files="/usr/bin/hwengine" nocross="Needs investigation: fails to link hwengine" replaces="hedgewars-data>=0" From 776682c9b817ec7958df21c6077938c32d7b46a7 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 081/115] dolphin-emu: revbump for ffmpeg9 --- srcpkgs/dolphin-emu/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/dolphin-emu/template b/srcpkgs/dolphin-emu/template index 4af8a5e15f66cc..6f5399edf524e9 100644 --- a/srcpkgs/dolphin-emu/template +++ b/srcpkgs/dolphin-emu/template @@ -1,7 +1,7 @@ # Template file for 'dolphin-emu' pkgname=dolphin-emu version=2606 -revision=1 +revision=2 _cpp_ipc_commit=b6cbbc940e25ff898f09a40b107781cef6027b13 _cpp_optparse_commit=2265d647232249a53a03b411099863ceca35f0d3 _cubeb_commit=54217bca3f3e0cd53c073690a23dd25d83557909 @@ -23,7 +23,7 @@ build_style=cmake configure_args="-DDISTRIBUTOR=voidlinux.org -DENABLE_ANALYTICS=OFF -DENABLE_AUTOUPDATE=OFF -DUSE_DISCORD_PRESENCE=OFF" hostmakedepends="gettext pkg-config python3 qt6-base qt6-tools" -makedepends="SDL3-devel SFML-devel alsa-lib-devel ffmpeg6-devel glew-devel +makedepends="SDL3-devel SFML-devel alsa-lib-devel ffmpeg-devel glew-devel hidapi-devel libbluetooth-devel libcurl-devel libenet-devel libevdev-devel libgomp-devel liblz4-devel liblzma-devel libopenal-devel libusb-devel lzo-devel mbedtls2-devel miniupnpc-devel portaudio-devel pugixml-devel pulseaudio-devel From ae584823af9c9851b05a3e5bf441f3ed4cc97594 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:47 -0500 Subject: [PATCH 082/115] vba-m: revbump for ffmpeg9 --- srcpkgs/vba-m/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/vba-m/template b/srcpkgs/vba-m/template index 7fd7ffc67c6b11..98a8fda0a89d70 100644 --- a/srcpkgs/vba-m/template +++ b/srcpkgs/vba-m/template @@ -2,13 +2,13 @@ pkgname=vba-m reverts=1292_2 version=2.2.3 -revision=2 +revision=3 build_style=cmake build_helper="cmake-wxWidgets-gtk3" configure_args="-DENABLE_GTK=TRUE -DENABLE_FFMPEG=TRUE -DENABLE_LINK=TRUE -DCMAKE_BUILD_TYPE=Release" hostmakedepends="gettext pkg-config unzip zip yasm wxWidgets-gtk3-devel" makedepends="zlib-devel libpng-devel MesaLib-devel libopenal-devel SDL2-devel - gtkmm2-devel ffmpeg6-devel gtk+3-devel x264-devel x265-devel + gtkmm2-devel ffmpeg-devel gtk+3-devel x264-devel x265-devel SFML-devel wxWidgets-gtk3-devel libgomp-devel" short_desc="Gameboy Advance Emulator" maintainer="Orphaned " From c729925ac79ad0b68ac869aa1fcb5c61a4082f6f Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:43 -0500 Subject: [PATCH 083/115] arcan: revbump for ffmpeg9 --- srcpkgs/arcan/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/arcan/template b/srcpkgs/arcan/template index 088a3809d37f94..0b6064b4b98232 100644 --- a/srcpkgs/arcan/template +++ b/srcpkgs/arcan/template @@ -2,7 +2,7 @@ # !! keep synced with: acfgfs aclip aloadimage pkgname=arcan version=0.7.1 -revision=1 +revision=2 create_wrksrc=yes build_wrksrc=arcan/src build_style=cmake @@ -12,7 +12,7 @@ configure_args="-DDISTR_TAG='VoidLinux' -DVIDEO_PLATFORM=egl-dri $(vopt_if luajit '-DDISABLE_JIT=OFF' '-DDISABLE_JIT=ON')" hostmakedepends="pkg-config $(vopt_if wayland wayland-devel)" -makedepends="MesaLib-devel ffmpeg6-devel file-devel freetype-devel liblzma-devel +makedepends="MesaLib-devel ffmpeg-devel file-devel freetype-devel liblzma-devel libopenal-devel libusb-devel libvncserver-devel libxkbcommon-devel sqlite-devel vlc-devel SDL2-devel xcb-util-devel xcb-util-wm-devel mupdf-devel $(vopt_if tts 'libespeak-ng-devel') @@ -27,7 +27,7 @@ homepage="https://arcan-fe.com/" _versionOpenal=0.6.2 distfiles="https://codeberg.org/letoram/arcan/archive/${version}.tar.gz https://github.com/letoram/openal/archive/${_versionOpenal}.tar.gz>openal_arcan.${_versionOpenal}.tar.gz" -checksum="b015dba937a5dc3ef525d09d07cd59f8aeeb8173e37a2f514ff5d19f7bc1ed0c +checksum="d39f9b6b46354720b9cd55b8fce69e917fb2746c8e39a2c6658bbf7ea08e3719 7c6ac2bd5228f56335da944f5a85b67d6dd95ba4d84f74be4209ba6aee38664b" export CMAKE_GENERATOR="Unix Makefiles" From 02bf47a2e35049d17ba5fde4eb5f0a71549c1b1c Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:46 -0500 Subject: [PATCH 084/115] openimageio: revbump for ffmpeg9 --- srcpkgs/openimageio/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/openimageio/template b/srcpkgs/openimageio/template index aa9802eedfea25..dac28a638d6afc 100644 --- a/srcpkgs/openimageio/template +++ b/srcpkgs/openimageio/template @@ -1,7 +1,7 @@ # Template file for 'openimageio' pkgname=openimageio version=3.1.8.0 -revision=2 +revision=3 build_style=cmake build_helper=qemu configure_args="-DUSE_QT=0 -DUSE_PYTHON=0 -DOIIO_BUILD_TESTS=0 @@ -10,7 +10,7 @@ configure_args="-DUSE_QT=0 -DUSE_PYTHON=0 -DOIIO_BUILD_TESTS=0 hostmakedepends="pkg-config git" makedepends="boost-headers giflib-devel libraw-devel libopenjpeg2-devel libwebp-devel libjpeg-turbo-devel tiff-devel libpng-devel libopenexr-devel freetype-devel - ffmpeg6-devel opencolorio-devel ptex-devel libheif-devel openvdb-devel + ffmpeg-devel opencolorio-devel ptex-devel libheif-devel openvdb-devel robin-map fmt-devel libjxl-devel" short_desc="Library for reading and writing images" maintainer="lemmi " From afe2676a214d4e3078bf69202e07b99720c10d76 Mon Sep 17 00:00:00 2001 From: zlice Date: Sun, 30 Nov 2025 21:54:44 -0500 Subject: [PATCH 085/115] blender: revbump for ffmpeg8 --- srcpkgs/blender/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/blender/template b/srcpkgs/blender/template index f08a3386d351e3..4fcebe34d61dea 100644 --- a/srcpkgs/blender/template +++ b/srcpkgs/blender/template @@ -1,7 +1,7 @@ # Template file for 'blender' pkgname=blender version=5.0.0 -revision=1 +revision=2 archs="x86_64* aarch64* ppc64*" build_style=cmake build_helper="qemu numpy" @@ -19,7 +19,7 @@ configure_args="-DWITH_INSTALL_PORTABLE=OFF -DWITH_PYTHON_INSTALL=OFF hostmakedepends="pkg-config python3 wayland-devel" makedepends="libgomp-devel libpng-devel tiff-devel python3-devel glu-devel glew-devel freetype-devel jack-devel libopenal-devel libsndfile-devel - libsamplerate-devel ffmpeg6-devel fftw-devel boost-headers pcre-devel llvm + libsamplerate-devel ffmpeg8-devel fftw-devel boost-headers pcre-devel llvm libopenexr-devel libopenjpeg2-devel libXi-devel openimageio-devel opencolorio-devel opencollada-devel python3-numpy libXrender-devel OpenSubdiv-devel tbb-devel libxml2-devel openvdb-devel alembic-devel From 3a098f46236a8f7c8ed929e07420b036c7abb631 Mon Sep 17 00:00:00 2001 From: zlice Date: Tue, 2 Dec 2025 18:15:19 -0500 Subject: [PATCH 086/115] deadbeef: revbump for ffmpeg9 --- srcpkgs/deadbeef/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/deadbeef/template b/srcpkgs/deadbeef/template index 442588661a22bb..d7dab75d739e97 100644 --- a/srcpkgs/deadbeef/template +++ b/srcpkgs/deadbeef/template @@ -1,13 +1,13 @@ # Template file for 'deadbeef' pkgname=deadbeef version=1.10.3 -revision=1 +revision=2 build_style=gnu-configure configure_args="--disable-oss --disable-gtk2 --disable-libretro" hostmakedepends="automake libtool gettext gettext-devel intltool pkg-config yasm clang glib-devel" makedepends=" - alsa-lib-devel dbus-devel faad2-devel ffmpeg6-devel gtk+3-devel + alsa-lib-devel dbus-devel faad2-devel ffmpeg-devel gtk+3-devel jansson-devel libcddb-devel libcdio-devel libcurl-devel libflac-devel libmad-devel libsamplerate-devel libsndfile-devel libvorbis-devel libzip-devel mpg123-devel opusfile-devel pulseaudio-devel From 286a841ca24b8f86364e6853f71b2b184a522e36 Mon Sep 17 00:00:00 2001 From: zlice Date: Fri, 5 Dec 2025 17:36:19 -0500 Subject: [PATCH 087/115] aubio: revbump for ffmpeg9 --- srcpkgs/aubio/patches/ffmpeg8.patch | 348 ++++++++++++++++++++++++++++ srcpkgs/aubio/template | 4 +- 2 files changed, 350 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/aubio/patches/ffmpeg8.patch diff --git a/srcpkgs/aubio/patches/ffmpeg8.patch b/srcpkgs/aubio/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..57d5aad13e2c7d --- /dev/null +++ b/srcpkgs/aubio/patches/ffmpeg8.patch @@ -0,0 +1,348 @@ +from current git file vs 49 release (2025-dec) +--- a/src/io/source_avcodec.c ++++ b/src/io/source_avcodec.c +@@ -24,11 +24,7 @@ + + #include + #include +-#if defined(HAVE_SWRESAMPLE) + #include +-#elif defined(HAVE_AVRESAMPLE) +-#include +-#endif + #include + + // determine whether we use libavformat from ffmpeg or from libav +@@ -56,6 +52,12 @@ + #define av_packet_unref av_free_packet + #endif + ++#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(57,28,100) ++//#warning "libavutil < 57.28.100 is deprecated" ++#else ++#define LIBAVUTIL_HAS_CH_LAYOUT ++#endif ++ + #include "aubio_priv.h" + #include "fvec.h" + #include "fmat.h" +@@ -64,8 +66,14 @@ + + #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56, 56, 0) + #define AUBIO_AVCODEC_MAX_BUFFER_SIZE FF_MIN_BUFFER_SIZE +-#else ++#elif LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 40, 100) + #define AUBIO_AVCODEC_MAX_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE ++#else ++#define AUBIO_AVCODEC_MAX_BUFFER_SIZE 16384 ++#endif ++ ++#if LIBAVCODEC_VERSION_MAJOR >= 59 ++#define FF_API_LAVF_AVCTX 1 + #endif + + struct _aubio_source_avcodec_t { +@@ -82,12 +90,12 @@ + AVFormatContext *avFormatCtx; + AVCodecContext *avCodecCtx; + AVFrame *avFrame; ++#if FF_API_INIT_PACKET ++ AVPacket *avPacket; ++#else + AVPacket avPacket; +-#ifdef HAVE_AVRESAMPLE +- AVAudioResampleContext *avr; +-#elif defined(HAVE_SWRESAMPLE) +- SwrContext *avr; + #endif ++ SwrContext *avr; + smpl_t *output; + uint_t read_samples; + uint_t read_index; +@@ -122,11 +130,15 @@ + AVFormatContext *avFormatCtx = NULL; + AVCodecContext *avCodecCtx = NULL; + AVFrame *avFrame = NULL; ++#if FF_API_INIT_PACKET ++ AVPacket *avPacket = NULL; ++#endif + sint_t selected_stream = -1; + #if FF_API_LAVF_AVCTX + AVCodecParameters *codecpar; + #endif +- AVCodec *codec; ++ ++ const AVCodec *codec; + uint_t i; + int err; + if (path == NULL) { +@@ -259,7 +271,11 @@ + + /* get input specs */ + s->input_samplerate = avCodecCtx->sample_rate; ++#ifdef LIBAVUTIL_HAS_CH_LAYOUT ++ s->input_channels = avCodecCtx->ch_layout.nb_channels; ++#else + s->input_channels = avCodecCtx->channels; ++#endif + //AUBIO_DBG("input_samplerate: %d\n", s->input_samplerate); + //AUBIO_DBG("input_channels: %d\n", s->input_channels); + +@@ -277,8 +293,17 @@ + avFrame = av_frame_alloc(); + if (!avFrame) { + AUBIO_ERR("source_avcodec: Could not allocate frame for (%s)\n", s->path); ++ goto beach; + } + ++#if FF_API_INIT_PACKET ++ avPacket = av_packet_alloc(); ++ if (!avPacket) { ++ AUBIO_ERR("source_avcodec: Could not allocate packet for (%s)\n", s->path); ++ goto beach; ++ } ++#endif ++ + /* allocate output for avr */ + s->output = (smpl_t *)av_malloc(AUBIO_AVCODEC_MAX_BUFFER_SIZE + * sizeof(smpl_t)); +@@ -289,6 +314,9 @@ + s->avFormatCtx = avFormatCtx; + s->avCodecCtx = avCodecCtx; + s->avFrame = avFrame; ++#if FF_API_INIT_PACKET ++ s->avPacket = avPacket; ++#endif + + aubio_source_avcodec_reset_resampler(s); + +@@ -312,16 +340,27 @@ + // create or reset resampler to/from mono/multi-channel + if ( s->avr == NULL ) { + int err; ++ SwrContext *avr = swr_alloc(); ++#ifdef LIBAVUTIL_HAS_CH_LAYOUT ++ AVChannelLayout input_layout; ++ AVChannelLayout output_layout; ++ av_channel_layout_default(&input_layout, s->input_channels); ++ av_channel_layout_default(&output_layout, s->input_channels); ++ ++#if LIBSWRESAMPLE_VERSION_INT < AV_VERSION_INT (4, 5, 100) ++ av_opt_set_chlayout(avr, "in_channel_layout", &input_layout, 0); ++ av_opt_set_chlayout(avr, "out_channel_layout", &output_layout, 0); ++#else ++ av_opt_set_chlayout(avr, "in_chlayout", &input_layout, 0); ++ av_opt_set_chlayout(avr, "out_chlayout", &output_layout, 0); ++#endif ++#else + int64_t input_layout = av_get_default_channel_layout(s->input_channels); + int64_t output_layout = av_get_default_channel_layout(s->input_channels); +-#ifdef HAVE_AVRESAMPLE +- AVAudioResampleContext *avr = avresample_alloc_context(); +-#elif defined(HAVE_SWRESAMPLE) +- SwrContext *avr = swr_alloc(); +-#endif /* HAVE_AVRESAMPLE || HAVE_SWRESAMPLE */ + + av_opt_set_int(avr, "in_channel_layout", input_layout, 0); + av_opt_set_int(avr, "out_channel_layout", output_layout, 0); ++#endif + av_opt_set_int(avr, "in_sample_rate", s->input_samplerate, 0); + av_opt_set_int(avr, "out_sample_rate", s->samplerate, 0); + av_opt_set_int(avr, "in_sample_fmt", s->avCodecCtx->sample_fmt, 0); +@@ -332,11 +371,7 @@ + #endif + // TODO: use planar? + //av_opt_set_int(avr, "out_sample_fmt", AV_SAMPLE_FMT_FLTP, 0); +-#ifdef HAVE_AVRESAMPLE +- if ( ( err = avresample_open(avr) ) < 0) +-#elif defined(HAVE_SWRESAMPLE) + if ( ( err = swr_init(avr) ) < 0) +-#endif /* HAVE_AVRESAMPLE || HAVE_SWRESAMPLE */ + { + char errorstr[256]; + av_strerror (err, errorstr, sizeof(errorstr)); +@@ -354,36 +389,34 @@ + AVFormatContext *avFormatCtx = s->avFormatCtx; + AVCodecContext *avCodecCtx = s->avCodecCtx; + AVFrame *avFrame = s->avFrame; +- AVPacket avPacket = s->avPacket; +-#ifdef HAVE_AVRESAMPLE +- AVAudioResampleContext *avr = s->avr; +-#elif defined(HAVE_SWRESAMPLE) ++#if FF_API_INIT_PACKET ++ AVPacket *avPacket = s->avPacket; ++#else ++ AVPacket *avPacket = &s->avPacket; ++#endif + SwrContext *avr = s->avr; +-#endif /* HAVE_AVRESAMPLE || HAVE_SWRESAMPLE */ + int got_frame = 0; +-#ifdef HAVE_AVRESAMPLE +- int in_linesize = 0; +- int in_samples = avFrame->nb_samples; +- int out_linesize = 0; +- int max_out_samples = AUBIO_AVCODEC_MAX_BUFFER_SIZE; +- int out_samples = 0; +-#elif defined(HAVE_SWRESAMPLE) + int in_samples = avFrame->nb_samples; ++#ifdef LIBAVUTIL_HAS_CH_LAYOUT ++ int max_out_samples = AUBIO_AVCODEC_MAX_BUFFER_SIZE / avCodecCtx->ch_layout.nb_channels; ++#else + int max_out_samples = AUBIO_AVCODEC_MAX_BUFFER_SIZE / avCodecCtx->channels; ++#endif + int out_samples = 0; +-#endif /* HAVE_AVRESAMPLE || HAVE_SWRESAMPLE */ + smpl_t *output = s->output; + #ifndef FF_API_LAVF_AVCTX + int len = 0; + #else + int ret = 0; + #endif +- av_init_packet (&avPacket); ++#ifndef FF_API_INIT_PACKET ++ av_init_packet (avPacket); ++#endif + *read_samples = 0; + + do + { +- int err = av_read_frame (avFormatCtx, &avPacket); ++ int err = av_read_frame (avFormatCtx, avPacket); + if (err == AVERROR_EOF) { + s->eof = 1; + goto beach; +@@ -396,10 +429,10 @@ + s->eof = 1; + goto beach; + } +- } while (avPacket.stream_index != s->selected_stream); ++ } while (avPacket->stream_index != s->selected_stream); + + #if FF_API_LAVF_AVCTX +- ret = avcodec_send_packet(avCodecCtx, &avPacket); ++ ret = avcodec_send_packet(avCodecCtx, avPacket); + if (ret < 0 && ret != AVERROR_EOF) { + AUBIO_ERR("source_avcodec: error when sending packet for %s\n", s->path); + goto beach; +@@ -422,7 +455,7 @@ + } + } + #else +- len = avcodec_decode_audio4(avCodecCtx, avFrame, &got_frame, &avPacket); ++ len = avcodec_decode_audio4(avCodecCtx, avFrame, &got_frame, avPacket); + + if (len < 0) { + AUBIO_ERR("source_avcodec: error while decoding %s\n", s->path); +@@ -436,33 +469,27 @@ + } + + #if LIBAVUTIL_VERSION_MAJOR > 52 +- if (avFrame->channels != (sint_t)s->input_channels) { ++#ifdef LIBAVUTIL_HAS_CH_LAYOUT ++ int frame_channels = avFrame->ch_layout.nb_channels; ++#else ++ int frame_channels = avFrame->channels; ++#endif ++ if (frame_channels != (sint_t)s->input_channels) { + AUBIO_WRN ("source_avcodec: trying to read from %d channel(s)," + "but configured for %d; is '%s' corrupt?\n", +- avFrame->channels, s->input_channels, s->path); ++ frame_channels, s->input_channels, s->path); + goto beach; + } + #else + #warning "avutil < 53 is deprecated, crashes might occur on corrupt files" + #endif + +-#ifdef HAVE_AVRESAMPLE +- in_linesize = 0; +- av_samples_get_buffer_size(&in_linesize, avCodecCtx->channels, +- avFrame->nb_samples, avCodecCtx->sample_fmt, 1); + in_samples = avFrame->nb_samples; +- out_linesize = 0; + max_out_samples = AUBIO_AVCODEC_MAX_BUFFER_SIZE; +- out_samples = avresample_convert ( avr, +- (uint8_t **)&output, out_linesize, max_out_samples, +- (uint8_t **)avFrame->data, in_linesize, in_samples); +-#elif defined(HAVE_SWRESAMPLE) +- in_samples = avFrame->nb_samples; +- max_out_samples = AUBIO_AVCODEC_MAX_BUFFER_SIZE / avCodecCtx->channels; ++ if (frame_channels > 0) max_out_samples /= frame_channels; + out_samples = swr_convert( avr, + (uint8_t **)&output, max_out_samples, + (const uint8_t **)avFrame->data, in_samples); +-#endif /* HAVE_AVRESAMPLE || HAVE_SWRESAMPLE */ + if (out_samples < 0) { + AUBIO_WRN("source_avcodec: error while resampling %s (%d)\n", + s->path, out_samples); +@@ -472,7 +499,7 @@ + *read_samples = out_samples; + + beach: +- av_packet_unref(&avPacket); ++ av_packet_unref(avPacket); + } + + void aubio_source_avcodec_do(aubio_source_avcodec_t * s, fvec_t * read_data, +@@ -596,19 +623,13 @@ + s->eof = 0; + s->read_index = 0; + s->read_samples = 0; +-#ifdef HAVE_AVRESAMPLE +- // reset the AVAudioResampleContext +- avresample_close(s->avr); +- avresample_open(s->avr); +-#elif defined(HAVE_SWRESAMPLE) + swr_close(s->avr); + swr_init(s->avr); +-#endif + return ret; + } + + uint_t aubio_source_avcodec_get_duration (aubio_source_avcodec_t * s) { +- if (s && &(s->avFormatCtx) != NULL) { ++ if (s && s->avFormatCtx != NULL) { + int64_t duration = s->avFormatCtx->duration; + return s->samplerate * ((uint_t)duration / 1e6 ); + } +@@ -617,13 +638,8 @@ + + uint_t aubio_source_avcodec_close(aubio_source_avcodec_t * s) { + if (s->avr != NULL) { +-#ifdef HAVE_AVRESAMPLE +- avresample_close( s->avr ); +- av_free ( s->avr ); +-#elif defined(HAVE_SWRESAMPLE) + swr_close ( s->avr ); + swr_free ( &s->avr ); +-#endif + } + s->avr = NULL; + if (s->avCodecCtx != NULL) { +@@ -638,7 +654,13 @@ + avformat_close_input(&s->avFormatCtx); + s->avFormatCtx = NULL; + } ++#if FF_API_INIT_PACKET ++ if (s->avPacket) { ++ av_packet_unref(s->avPacket); ++ } ++#else + av_packet_unref(&s->avPacket); ++#endif + return AUBIO_OK; + } + +@@ -653,6 +675,12 @@ + av_frame_free( &(s->avFrame) ); + } + s->avFrame = NULL; ++#if FF_API_INIT_PACKET ++ if (s->avPacket != NULL) { ++ av_packet_free( &(s->avPacket) ); ++ } ++ s->avPacket = NULL; ++#endif + if (s->path) { + AUBIO_FREE(s->path); + } diff --git a/srcpkgs/aubio/template b/srcpkgs/aubio/template index 98b5b8168c2a25..926e0dccd9ce59 100644 --- a/srcpkgs/aubio/template +++ b/srcpkgs/aubio/template @@ -1,11 +1,11 @@ # Template file for 'aubio' pkgname=aubio version=0.4.9 -revision=2 +revision=3 build_style=waf3 # XXX lash, pure and swig support. hostmakedepends="pkg-config txt2man" -makedepends="libsamplerate-devel fftw-devel jack-devel ffmpeg6-devel" +makedepends="libsamplerate-devel fftw-devel jack-devel ffmpeg-devel" short_desc="Library for audio labelling" maintainer="Orphaned " license="GPL-3.0-or-later" From c6b0a49a7d869eb01f567bd7c9324358da8af61a Mon Sep 17 00:00:00 2001 From: zlice Date: Mon, 22 Dec 2025 16:58:10 -0500 Subject: [PATCH 088/115] tvheadend: revbump for ffmpeg9 --- srcpkgs/tvheadend/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/tvheadend/template b/srcpkgs/tvheadend/template index 4bafba0f5954f0..ed09f06778c732 100644 --- a/srcpkgs/tvheadend/template +++ b/srcpkgs/tvheadend/template @@ -1,14 +1,14 @@ # Template file for 'tvheadend' pkgname=tvheadend version=4.3 -revision=1 +revision=2 build_style=gnu-configure configure_args="--enable-dvbscan --disable-ffmpeg_static --disable-hdhomerun_static --disable-bintray_cache --disable-libx264_static --disable-libx265_static --disable-libvpx_static --disable-libtheora_static --disable-libvorbis_static --disable-libfdkaac_static" hostmakedepends="gettext pkg-config python3 git which" -makedepends="avahi-libs-devel openssl-devel zlib-devel libcurl-devel ffmpeg6-devel" +makedepends="avahi-libs-devel openssl-devel zlib-devel libcurl-devel ffmpeg-devel" short_desc="TV streaming server" maintainer="lemmi " license="GPL-3.0-only" From 15aa7866cad4a3fb80bd4aa6c1744b07ec541f7b Mon Sep 17 00:00:00 2001 From: zlice Date: Tue, 23 Dec 2025 10:13:53 -0500 Subject: [PATCH 089/115] qt5-webengine: revbump for ffmpeg9 --- .../0200-qt5-qtwebengine-ffmpeg7.patch | 493 ++++++++++++++++++ .../0201-qt5-qtwebengine-ffmpeg8.patch | 113 ++++ .../patches/0202-more-ffmpeg8.patch | 55 ++ srcpkgs/qt5-webengine/template | 4 +- 4 files changed, 663 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/qt5-webengine/patches/0200-qt5-qtwebengine-ffmpeg7.patch create mode 100644 srcpkgs/qt5-webengine/patches/0201-qt5-qtwebengine-ffmpeg8.patch create mode 100644 srcpkgs/qt5-webengine/patches/0202-more-ffmpeg8.patch diff --git a/srcpkgs/qt5-webengine/patches/0200-qt5-qtwebengine-ffmpeg7.patch b/srcpkgs/qt5-webengine/patches/0200-qt5-qtwebengine-ffmpeg7.patch new file mode 100644 index 00000000000000..182239fdd25c0a --- /dev/null +++ b/srcpkgs/qt5-webengine/patches/0200-qt5-qtwebengine-ffmpeg7.patch @@ -0,0 +1,493 @@ +From 6e554a30893150793c2638e3689cf208ffc8e375 Mon Sep 17 00:00:00 2001 +From: Dale Curtis +Date: Sat, 2 Apr 2022 05:13:53 +0000 +Subject: [PATCH] Roll src/third_party/ffmpeg/ 574c39cce..32b2d1d526 (1125 + commits) + +https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+log/574c39cce323..32b2d1d526 + +Created with: + roll-dep src/third_party/ffmpeg + +Fixed: 1293918 +Cq-Include-Trybots: luci.chromium.try:mac_chromium_asan_rel_ng,linux_chromium_asan_rel_ng,linux_chromium_chromeos_asan_rel_ng +Change-Id: I41945d0f963e3d1f65940067bac22f63b68e37d2 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3565647 +Auto-Submit: Dale Curtis +Reviewed-by: Dan Sanders +Commit-Queue: Dale Curtis +Cr-Commit-Position: refs/heads/main@{#988253} +--- + .../clear_key_cdm/ffmpeg_cdm_audio_decoder.cc | 29 ++++++++++--------- + media/ffmpeg/ffmpeg_common.cc | 11 +++---- + media/filters/audio_file_reader.cc | 9 +++--- + media/filters/audio_file_reader_unittest.cc | 6 ++-- + .../filters/audio_video_metadata_extractor.cc | 11 +++++-- + .../filters/ffmpeg_aac_bitstream_converter.cc | 7 +++-- + ...ffmpeg_aac_bitstream_converter_unittest.cc | 2 +- + media/filters/ffmpeg_audio_decoder.cc | 13 +++++---- + 8 files changed, 51 insertions(+), 37 deletions(-) + +diff --git a/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc b/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc +index a043005..9ae2ca9 100644 +--- a/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc ++++ b/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc +@@ -73,7 +73,7 @@ void CdmAudioDecoderConfigToAVCodecContext( + codec_context->sample_fmt = AV_SAMPLE_FMT_NONE; + } + +- codec_context->channels = config.channel_count; ++ codec_context->ch_layout.nb_channels = config.channel_count; + codec_context->sample_rate = config.samples_per_second; + + if (config.extra_data) { +@@ -123,8 +123,8 @@ void CopySamples(cdm::AudioFormat cdm_format, + case cdm::kAudioFormatPlanarS16: + case cdm::kAudioFormatPlanarF32: { + const int decoded_size_per_channel = +- decoded_audio_size / av_frame.channels; +- for (int i = 0; i < av_frame.channels; ++i) { ++ decoded_audio_size / av_frame.ch_layout.nb_channels; ++ for (int i = 0; i < av_frame.ch_layout.nb_channels; ++i) { + memcpy(output_buffer, av_frame.extended_data[i], + decoded_size_per_channel); + output_buffer += decoded_size_per_channel; +@@ -184,13 +184,14 @@ bool FFmpegCdmAudioDecoder::Initialize( + // Success! + decoding_loop_.reset(new FFmpegDecodingLoop(codec_context_.get())); + samples_per_second_ = config.samples_per_second; +- bytes_per_frame_ = codec_context_->channels * config.bits_per_channel / 8; ++ bytes_per_frame_ = ++ codec_context_->ch_layout.nb_channels * config.bits_per_channel / 8; + output_timestamp_helper_.reset( + new AudioTimestampHelper(config.samples_per_second)); + is_initialized_ = true; + + // Store initial values to guard against midstream configuration changes. +- channels_ = codec_context_->channels; ++ channels_ = codec_context_->ch_layout.nb_channels; + av_sample_format_ = codec_context_->sample_fmt; + + return true; +@@ -290,17 +291,18 @@ cdm::Status FFmpegCdmAudioDecoder::DecodeBuffer( + for (auto& frame : audio_frames) { + int decoded_audio_size = 0; + if (frame->sample_rate != samples_per_second_ || +- frame->channels != channels_ || frame->format != av_sample_format_) { ++ frame->ch_layout.nb_channels != channels_ || ++ frame->format != av_sample_format_) { + DLOG(ERROR) << "Unsupported midstream configuration change!" + << " Sample Rate: " << frame->sample_rate << " vs " +- << samples_per_second_ << ", Channels: " << frame->channels ++ << samples_per_second_ << ", Channels: " << frame->ch_layout.nb_channels + << " vs " << channels_ << ", Sample Format: " << frame->format + << " vs " << av_sample_format_; + return cdm::kDecodeError; + } + + decoded_audio_size = av_samples_get_buffer_size( +- nullptr, codec_context_->channels, frame->nb_samples, ++ nullptr, codec_context_->ch_layout.nb_channels, frame->nb_samples, + codec_context_->sample_fmt, 1); + if (!decoded_audio_size) + continue; +@@ -319,7 +321,7 @@ bool FFmpegCdmAudioDecoder::OnNewFrame( + size_t* total_size, + std::vector>* audio_frames, + AVFrame* frame) { +- *total_size += av_samples_get_buffer_size(nullptr, codec_context_->channels, ++ *total_size += av_samples_get_buffer_size(nullptr, codec_context_->ch_layout.nb_channels, + frame->nb_samples, + codec_context_->sample_fmt, 1); + audio_frames->emplace_back(av_frame_clone(frame)); +diff --git a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +index c17dd9f..0448cb5 100644 +--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc ++++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +@@ -341,10 +341,11 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context, + codec_context->sample_fmt, codec_context->codec_id); + + ChannelLayout channel_layout = +- codec_context->channels > 8 ++ codec_context->ch_layout.nb_channels > 8 + ? CHANNEL_LAYOUT_DISCRETE +- : ChannelLayoutToChromeChannelLayout(codec_context->channel_layout, +- codec_context->channels); ++ : ChannelLayoutToChromeChannelLayout( ++ codec_context->ch_layout.u.mask, ++ codec_context->ch_layout.nb_channels); + + int sample_rate = codec_context->sample_rate; + switch (codec) { +@@ -397,7 +398,7 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context, + extra_data, encryption_scheme, seek_preroll, + codec_context->delay); + if (channel_layout == CHANNEL_LAYOUT_DISCRETE) +- config->SetChannelsForDiscrete(codec_context->channels); ++ config->SetChannelsForDiscrete(codec_context->ch_layout.nb_channels); + + #if BUILDFLAG(ENABLE_PLATFORM_AC3_EAC3_AUDIO) + // These are bitstream formats unknown to ffmpeg, so they don't have +@@ -462,7 +463,7 @@ void AudioDecoderConfigToAVCodecContext(const AudioDecoderConfig& config, + + // TODO(scherkus): should we set |channel_layout|? I'm not sure if FFmpeg uses + // said information to decode. +- codec_context->channels = config.channels(); ++ codec_context->ch_layout.nb_channels = config.channels(); + codec_context->sample_rate = config.samples_per_second(); + + if (config.extra_data().empty()) { +diff --git a/src/3rdparty/chromium/media/filters/audio_file_reader.cc b/src/3rdparty/chromium/media/filters/audio_file_reader.cc +index bd73908..745c4c7 100644 +--- a/src/3rdparty/chromium/media/filters/audio_file_reader.cc ++++ b/src/3rdparty/chromium/media/filters/audio_file_reader.cc +@@ -112,14 +112,15 @@ bool AudioFileReader::OpenDecoder() { + + // Verify the channel layout is supported by Chrome. Acts as a sanity check + // against invalid files. See http://crbug.com/171962 +- if (ChannelLayoutToChromeChannelLayout(codec_context_->channel_layout, +- codec_context_->channels) == ++ if (ChannelLayoutToChromeChannelLayout( ++ codec_context_->ch_layout.u.mask, ++ codec_context_->ch_layout.nb_channels) == + CHANNEL_LAYOUT_UNSUPPORTED) { + return false; + } + + // Store initial values to guard against midstream configuration changes. +- channels_ = codec_context_->channels; ++ channels_ = codec_context_->ch_layout.nb_channels; + audio_codec_ = CodecIDToAudioCodec(codec_context_->codec_id); + sample_rate_ = codec_context_->sample_rate; + av_sample_format_ = codec_context_->sample_fmt; +@@ -222,7 +223,7 @@ bool AudioFileReader::OnNewFrame( + if (frames_read < 0) + return false; + +- const int channels = frame->channels; ++ const int channels = frame->ch_layout.nb_channels; + if (frame->sample_rate != sample_rate_ || channels != channels_ || + frame->format != av_sample_format_) { + DLOG(ERROR) << "Unsupported midstream configuration change!" +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc b/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc +index 6f231c8..ca5e5fb 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc +@@ -195,14 +195,15 @@ bool FFmpegAACBitstreamConverter::ConvertPacket(AVPacket* packet) { + if (!header_generated_ || codec_ != stream_codec_parameters_->codec_id || + audio_profile_ != stream_codec_parameters_->profile || + sample_rate_index_ != sample_rate_index || +- channel_configuration_ != stream_codec_parameters_->channels || ++ channel_configuration_ != ++ stream_codec_parameters_->ch_layout.nb_channels || + frame_length_ != header_plus_packet_size) { + header_generated_ = + GenerateAdtsHeader(stream_codec_parameters_->codec_id, + 0, // layer + stream_codec_parameters_->profile, sample_rate_index, + 0, // private stream +- stream_codec_parameters_->channels, ++ stream_codec_parameters_->ch_layout.nb_channels, + 0, // originality + 0, // home + 0, // copyrighted_stream +@@ -214,7 +215,7 @@ bool FFmpegAACBitstreamConverter::ConvertPacket(AVPacket* packet) { + codec_ = stream_codec_parameters_->codec_id; + audio_profile_ = stream_codec_parameters_->profile; + sample_rate_index_ = sample_rate_index; +- channel_configuration_ = stream_codec_parameters_->channels; ++ channel_configuration_ = stream_codec_parameters_->ch_layout.nb_channels; + frame_length_ = header_plus_packet_size; + } + +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc b/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc +index ac8bb13..3e4e3f6 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc +@@ -29,7 +29,7 @@ class FFmpegAACBitstreamConverterTest : public testing::Test { + memset(&test_parameters_, 0, sizeof(AVCodecParameters)); + test_parameters_.codec_id = AV_CODEC_ID_AAC; + test_parameters_.profile = FF_PROFILE_AAC_MAIN; +- test_parameters_.channels = 2; ++ test_parameters_.ch_layout.nb_channels = 2; + test_parameters_.extradata = extradata_header_; + test_parameters_.extradata_size = sizeof(extradata_header_); + } +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc +index 72fac61..ab49fd5 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc +@@ -27,7 +27,7 @@ namespace media { + + // Return the number of channels from the data in |frame|. + static inline int DetermineChannels(AVFrame* frame) { +- return frame->channels; ++ return frame->ch_layout.nb_channels; + } + + // Called by FFmpeg's allocation routine to allocate a buffer. Uses +@@ -227,7 +227,7 @@ bool FFmpegAudioDecoder::OnNewFrame(const DecoderBuffer& buffer, + // Translate unsupported into discrete layouts for discrete configurations; + // ffmpeg does not have a labeled discrete configuration internally. + ChannelLayout channel_layout = ChannelLayoutToChromeChannelLayout( +- codec_context_->channel_layout, codec_context_->channels); ++ codec_context_->ch_layout.u.mask, codec_context_->ch_layout.nb_channels); + if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED && + config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE) { + channel_layout = CHANNEL_LAYOUT_DISCRETE; +@@ -344,11 +344,11 @@ bool FFmpegAudioDecoder::ConfigureDecoder(const AudioDecoderConfig& config) { + // Success! + av_sample_format_ = codec_context_->sample_fmt; + +- if (codec_context_->channels != config.channels()) { ++ if (codec_context_->ch_layout.nb_channels != config.channels()) { + MEDIA_LOG(ERROR, media_log_) + << "Audio configuration specified " << config.channels() + << " channels, but FFmpeg thinks the file contains " +- << codec_context_->channels << " channels"; ++ << codec_context_->ch_layout.nb_channels << " channels"; + ReleaseFFmpegResources(); + state_ = kUninitialized; + return false; +@@ -398,7 +398,7 @@ int FFmpegAudioDecoder::GetAudioBuffer(struct AVCodecContext* s, + if (frame->nb_samples <= 0) + return AVERROR(EINVAL); + +- if (s->channels != channels) { ++ if (s->ch_layout.nb_channels != channels) { + DLOG(ERROR) << "AVCodecContext and AVFrame disagree on channel count."; + return AVERROR(EINVAL); + } +@@ -431,7 +431,8 @@ int FFmpegAudioDecoder::GetAudioBuffer(struct AVCodecContext* s, + ChannelLayout channel_layout = + config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE + ? CHANNEL_LAYOUT_DISCRETE +- : ChannelLayoutToChromeChannelLayout(s->channel_layout, s->channels); ++ : ChannelLayoutToChromeChannelLayout(s->ch_layout.u.mask, ++ s->ch_layout.nb_channels); + + if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED) { + DLOG(ERROR) << "Unsupported channel layout."; +commit 62274859104bd828373ae406aa9309e610449ac5 +Author: Ted Meyer +Date: Fri Mar 22 19:56:55 2024 +0000 + + Replace deprecated use of AVCodecContext::reordered_opaque + + We can use the AV_CODEC_FLAG_COPY_OPAQUE flag on the codec context + now to trigger timestamp propagation. + + Bug: 330573128 + Change-Id: I6bc57241a35ab5283742aad8d42acb4dc5e85858 + Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5384308 + Commit-Queue: Ted (Chromium) Meyer + Reviewed-by: Dan Sanders + Cr-Commit-Position: refs/heads/main@{#1277051} + +diff --git a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +index 0448cb5..89e9cf9 100644 +--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc ++++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +@@ -414,7 +414,9 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context, + #if BUILDFLAG(USE_PROPRIETARY_CODECS) + // TODO(dalecurtis): Just use the profile from the codec context if ffmpeg + // ever starts supporting xHE-AAC. +- if (codec == kCodecAAC && codec_context->profile == FF_PROFILE_UNKNOWN) { ++ constexpr uint8_t kXHEAAc = 41; ++ if (codec == kCodecAAC && codec_context->profile == FF_PROFILE_UNKNOWN || ++ codec_context->profile == kXHEAAc) { + // Errors aren't fatal here, so just drop any MediaLog messages. + NullMediaLog media_log; + mp4::AAC aac_parser; +diff --git a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_regression_tests.cc b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_regression_tests.cc +index ebd1bab..04d5ecc 100644 +--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_regression_tests.cc ++++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_regression_tests.cc +@@ -86,16 +86,16 @@ FFMPEG_TEST_CASE(Cr47761, "crbug47761.ogg", PIPELINE_OK, PIPELINE_OK); + FFMPEG_TEST_CASE(Cr50045, "crbug50045.mp4", PIPELINE_OK, PIPELINE_OK); + FFMPEG_TEST_CASE(Cr62127, "crbug62127.webm", PIPELINE_OK, PIPELINE_OK); + FFMPEG_TEST_CASE(Cr93620, "security/93620.ogg", PIPELINE_OK, PIPELINE_OK); +-FFMPEG_TEST_CASE(Cr100492, +- "security/100492.webm", +- DECODER_ERROR_NOT_SUPPORTED, +- DECODER_ERROR_NOT_SUPPORTED); ++FFMPEG_TEST_CASE(Cr100492, "security/100492.webm", PIPELINE_OK, PIPELINE_OK); + FFMPEG_TEST_CASE(Cr100543, "security/100543.webm", PIPELINE_OK, PIPELINE_OK); + FFMPEG_TEST_CASE(Cr101458, + "security/101458.webm", + PIPELINE_ERROR_DECODE, + PIPELINE_ERROR_DECODE); +-FFMPEG_TEST_CASE(Cr108416, "security/108416.webm", PIPELINE_OK, PIPELINE_OK); ++FFMPEG_TEST_CASE(Cr108416, ++ "security/108416.webm", ++ PIPELINE_ERROR_DECODE, ++ PIPELINE_ERROR_DECODE); + FFMPEG_TEST_CASE(Cr110849, + "security/110849.mkv", + DEMUXER_ERROR_COULD_NOT_OPEN, +@@ -150,7 +150,10 @@ FFMPEG_TEST_CASE(Cr234630b, + "security/234630b.mov", + DEMUXER_ERROR_NO_SUPPORTED_STREAMS, + DEMUXER_ERROR_NO_SUPPORTED_STREAMS); +-FFMPEG_TEST_CASE(Cr242786, "security/242786.webm", PIPELINE_OK, PIPELINE_OK); ++FFMPEG_TEST_CASE(Cr242786, ++ "security/242786.webm", ++ PIPELINE_OK, ++ PIPELINE_ERROR_DECODE); + // Test for out-of-bounds access with slightly corrupt file (detection logic + // thinks it's a MONO file, but actually contains STEREO audio). + FFMPEG_TEST_CASE(Cr275590, +@@ -371,8 +374,8 @@ FFMPEG_TEST_CASE(WEBM_2, + DEMUXER_ERROR_NO_SUPPORTED_STREAMS); + FFMPEG_TEST_CASE(WEBM_4, + "security/out.webm.68798.1929", +- DECODER_ERROR_NOT_SUPPORTED, +- DECODER_ERROR_NOT_SUPPORTED); ++ PIPELINE_OK, ++ PIPELINE_OK); + FFMPEG_TEST_CASE(WEBM_5, "frame_size_change.webm", PIPELINE_OK, PIPELINE_OK); + + // General MKV test cases. +diff --git a/src/3rdparty/chromium/media/filters/audio_file_reader.cc b/src/3rdparty/chromium/media/filters/audio_file_reader.cc +index 745c4c7..2b3abba 100644 +--- a/src/3rdparty/chromium/media/filters/audio_file_reader.cc ++++ b/src/3rdparty/chromium/media/filters/audio_file_reader.cc +@@ -242,10 +242,10 @@ bool AudioFileReader::OnNewFrame( + // silence from being output. In the case where we are also discarding some + // portion of the packet (as indicated by a negative pts), we further want to + // adjust the duration downward by however much exists before zero. +- if (audio_codec_ == kCodecAAC && frame->pkt_duration) { ++ if (audio_codec_ == kCodecAAC && frame->duration) { + const base::TimeDelta pkt_duration = ConvertFromTimeBase( + glue_->format_context()->streams[stream_index_]->time_base, +- frame->pkt_duration + std::min(static_cast(0), frame->pts)); ++ frame->duration + std::min(static_cast(0), frame->pts)); + const base::TimeDelta frame_duration = base::TimeDelta::FromSecondsD( + frames_read / static_cast(sample_rate_)); + +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc +index 7996606..a15aafc 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc +@@ -86,7 +86,7 @@ bool FFmpegVideoDecoder::IsCodecSupported(VideoCodec codec) { + } + + FFmpegVideoDecoder::FFmpegVideoDecoder(MediaLog* media_log) +- : media_log_(media_log), state_(kUninitialized), decode_nalus_(false) { ++ : media_log_(media_log), state_(kUninitialized), decode_nalus_(false), timestamp_map_(128) { + DVLOG(1) << __func__; + thread_checker_.DetachFromThread(); + } +@@ -183,7 +183,6 @@ int FFmpegVideoDecoder::GetVideoBuffer(struct AVCodecContext* codec_context, + frame->width = coded_size.width(); + frame->height = coded_size.height(); + frame->format = codec_context->pix_fmt; +- frame->reordered_opaque = codec_context->reordered_opaque; + + // Now create an AVBufferRef for the data just allocated. It will own the + // reference to the VideoFrame object. +@@ -318,8 +317,10 @@ bool FFmpegVideoDecoder::FFmpegDecode(const DecoderBuffer& buffer) { + DCHECK(packet.data); + DCHECK_GT(packet.size, 0); + +- // Let FFmpeg handle presentation timestamp reordering. +- codec_context_->reordered_opaque = buffer.timestamp().InMicroseconds(); ++ const int64_t timestamp = buffer.timestamp().InMicroseconds(); ++ const TimestampId timestamp_id = timestamp_id_generator_.GenerateNextId(); ++ timestamp_map_.Put(timestamp_id, timestamp); ++ packet.opaque = reinterpret_cast(timestamp_id.GetUnsafeValue()); + } + + switch (decoding_loop_->DecodePacket( +@@ -358,8 +359,13 @@ bool FFmpegVideoDecoder::OnNewFrame(AVFrame* frame) { + + scoped_refptr video_frame = + reinterpret_cast(av_buffer_get_opaque(frame->buf[0])); ++ const auto ts_id = TimestampId(reinterpret_cast(frame->opaque)); ++ const auto ts_lookup = timestamp_map_.Get(ts_id); ++ if (ts_lookup == timestamp_map_.end()) { ++ return false; ++ } + video_frame->set_timestamp( +- base::TimeDelta::FromMicroseconds(frame->reordered_opaque)); ++ base::TimeDelta::FromMicroseconds(std::get<1>(*ts_lookup))); + video_frame->metadata()->power_efficient = false; + output_cb_.Run(video_frame); + return true; +@@ -385,8 +391,10 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config, + codec_context_->thread_count = GetFFmpegVideoDecoderThreadCount(config); + codec_context_->thread_type = + FF_THREAD_SLICE | (low_delay ? 0 : FF_THREAD_FRAME); ++ + codec_context_->opaque = this; + codec_context_->get_buffer2 = GetVideoBufferImpl; ++ codec_context_->flags |= AV_CODEC_FLAG_COPY_OPAQUE; + + if (decode_nalus_) + codec_context_->flags2 |= AV_CODEC_FLAG2_CHUNKS; +diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.h b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.h +index f13ce41..ee2444b 100644 +--- a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.h ++++ b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.h +@@ -8,6 +8,8 @@ + #include + #include + ++#include "base/containers/mru_cache.h" ++#include "base/util/type_safety/id_type.h" + #include "base/callback.h" + #include "base/macros.h" + #include "base/memory/ref_counted.h" +@@ -85,6 +87,20 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder { + // FFmpeg structures owned by this object. + std::unique_ptr codec_context_; + ++ // The gist here is that timestamps need to be 64 bits to store microsecond ++ // precision. A 32 bit integer would overflow at ~35 minutes at this level of ++ // precision. We can't cast the timestamp to the void ptr object used by the ++ // opaque field in ffmpeg then, because it would lose data on a 32 bit build. ++ // However, we don't actually have 2^31 timestamped frames in a single ++ // playback, so it's fine to use the 32 bit value as a key in a map which ++ // contains the actual timestamps. Additionally, we've in the past set 128 ++ // outstanding frames for re-ordering as a limit for cross-thread decoding ++ // tasks, so we'll do that here too with the LRU cache. ++ using TimestampId = util::IdType; ++ ++ TimestampId::Generator timestamp_id_generator_; ++ base::MRUCache timestamp_map_; ++ + VideoDecoderConfig config_; + + VideoFramePool frame_pool_; +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc +index d12fade..8abfbbf 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc +@@ -114,7 +114,6 @@ int H264DecoderImpl::AVGetBuffer2(AVCodecContext* context, + int total_size = y_size + 2 * uv_size; + + av_frame->format = context->pix_fmt; +- av_frame->reordered_opaque = context->reordered_opaque; + + // Set |av_frame| members as required by FFmpeg. + av_frame->data[kYPlaneIndex] = frame_buffer->MutableDataY(); +@@ -273,8 +272,6 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image, + return WEBRTC_VIDEO_CODEC_ERROR; + } + packet.size = static_cast(input_image.size()); +- int64_t frame_timestamp_us = input_image.ntp_time_ms_ * 1000; // ms -> μs +- av_context_->reordered_opaque = frame_timestamp_us; + + int result = avcodec_send_packet(av_context_.get(), &packet); + if (result < 0) { +@@ -290,10 +287,6 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image, + return WEBRTC_VIDEO_CODEC_ERROR; + } + +- // We don't expect reordering. Decoded frame tamestamp should match +- // the input one. +- RTC_DCHECK_EQ(av_frame_->reordered_opaque, frame_timestamp_us); +- + absl::optional qp; + // TODO(sakal): Maybe it is possible to get QP directly from FFmpeg. + h264_bitstream_parser_.ParseBitstream(input_image.data(), input_image.size()); diff --git a/srcpkgs/qt5-webengine/patches/0201-qt5-qtwebengine-ffmpeg8.patch b/srcpkgs/qt5-webengine/patches/0201-qt5-qtwebengine-ffmpeg8.patch new file mode 100644 index 00000000000000..5b7073f2b8f864 --- /dev/null +++ b/srcpkgs/qt5-webengine/patches/0201-qt5-qtwebengine-ffmpeg8.patch @@ -0,0 +1,113 @@ +diff -up qtwebengine-everywhere-src-5.15.18/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc.ffmpeg8 qtwebengine-everywhere-src-5.15.18/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +--- qtwebengine-everywhere-src-5.15.18/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc.ffmpeg8 2025-11-02 21:41:06.931797956 +0000 ++++ qtwebengine-everywhere-src-5.15.18/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc 2025-11-02 23:06:28.874349338 +0000 +@@ -237,22 +237,22 @@ AVCodecID VideoCodecToCodecID(VideoCodec + static VideoCodecProfile ProfileIDToVideoCodecProfile(int profile) { + // Clear out the CONSTRAINED & INTRA flags which are strict subsets of the + // corresponding profiles with which they're used. +- profile &= ~FF_PROFILE_H264_CONSTRAINED; +- profile &= ~FF_PROFILE_H264_INTRA; ++ profile &= ~AV_PROFILE_H264_CONSTRAINED; ++ profile &= ~AV_PROFILE_H264_INTRA; + switch (profile) { +- case FF_PROFILE_H264_BASELINE: ++ case AV_PROFILE_H264_BASELINE: + return H264PROFILE_BASELINE; +- case FF_PROFILE_H264_MAIN: ++ case AV_PROFILE_H264_MAIN: + return H264PROFILE_MAIN; +- case FF_PROFILE_H264_EXTENDED: ++ case AV_PROFILE_H264_EXTENDED: + return H264PROFILE_EXTENDED; +- case FF_PROFILE_H264_HIGH: ++ case AV_PROFILE_H264_HIGH: + return H264PROFILE_HIGH; +- case FF_PROFILE_H264_HIGH_10: ++ case AV_PROFILE_H264_HIGH_10: + return H264PROFILE_HIGH10PROFILE; +- case FF_PROFILE_H264_HIGH_422: ++ case AV_PROFILE_H264_HIGH_422: + return H264PROFILE_HIGH422PROFILE; +- case FF_PROFILE_H264_HIGH_444_PREDICTIVE: ++ case AV_PROFILE_H264_HIGH_444_PREDICTIVE: + return H264PROFILE_HIGH444PREDICTIVEPROFILE; + default: + DVLOG(1) << "Unknown profile id: " << profile; +@@ -263,23 +263,23 @@ static VideoCodecProfile ProfileIDToVide + static int VideoCodecProfileToProfileID(VideoCodecProfile profile) { + switch (profile) { + case H264PROFILE_BASELINE: +- return FF_PROFILE_H264_BASELINE; ++ return AV_PROFILE_H264_BASELINE; + case H264PROFILE_MAIN: +- return FF_PROFILE_H264_MAIN; ++ return AV_PROFILE_H264_MAIN; + case H264PROFILE_EXTENDED: +- return FF_PROFILE_H264_EXTENDED; ++ return AV_PROFILE_H264_EXTENDED; + case H264PROFILE_HIGH: +- return FF_PROFILE_H264_HIGH; ++ return AV_PROFILE_H264_HIGH; + case H264PROFILE_HIGH10PROFILE: +- return FF_PROFILE_H264_HIGH_10; ++ return AV_PROFILE_H264_HIGH_10; + case H264PROFILE_HIGH422PROFILE: +- return FF_PROFILE_H264_HIGH_422; ++ return AV_PROFILE_H264_HIGH_422; + case H264PROFILE_HIGH444PREDICTIVEPROFILE: +- return FF_PROFILE_H264_HIGH_444_PREDICTIVE; ++ return AV_PROFILE_H264_HIGH_444_PREDICTIVE; + default: + DVLOG(1) << "Unknown VideoCodecProfile: " << profile; + } +- return FF_PROFILE_UNKNOWN; ++ return AV_PROFILE_UNKNOWN; + } + + SampleFormat AVSampleFormatToSampleFormat(AVSampleFormat sample_format, +@@ -415,7 +415,7 @@ bool AVCodecContextToAudioDecoderConfig( + // TODO(dalecurtis): Just use the profile from the codec context if ffmpeg + // ever starts supporting xHE-AAC. + constexpr uint8_t kXHEAAc = 41; +- if (codec == kCodecAAC && codec_context->profile == FF_PROFILE_UNKNOWN || ++ if (codec == kCodecAAC && codec_context->profile == AV_PROFILE_UNKNOWN || + codec_context->profile == kXHEAAc) { + // Errors aren't fatal here, so just drop any MediaLog messages. + NullMediaLog media_log; +@@ -537,16 +537,16 @@ bool AVStreamToVideoDecoderConfig(const + break; + case kCodecVP9: + switch (codec_context->profile) { +- case FF_PROFILE_VP9_0: ++ case AV_PROFILE_VP9_0: + profile = VP9PROFILE_PROFILE0; + break; +- case FF_PROFILE_VP9_1: ++ case AV_PROFILE_VP9_1: + profile = VP9PROFILE_PROFILE1; + break; +- case FF_PROFILE_VP9_2: ++ case AV_PROFILE_VP9_2: + profile = VP9PROFILE_PROFILE2; + break; +- case FF_PROFILE_VP9_3: ++ case AV_PROFILE_VP9_3: + profile = VP9PROFILE_PROFILE3; + break; + default: +@@ -645,9 +645,15 @@ bool AVStreamToVideoDecoderConfig(const + coded_size, visible_rect, natural_size, extra_data, + GetEncryptionScheme(stream)); + ++#if (LIBAVFORMAT_VERSION_MAJOR < 62) + if (stream->nb_side_data) { + for (int i = 0; i < stream->nb_side_data; ++i) { + AVPacketSideData side_data = stream->side_data[i]; ++#else ++ if (stream->codecpar->nb_coded_side_data) { ++ for (int i = 0; i < stream->codecpar->nb_coded_side_data; ++i) { ++ const auto& side_data = stream->codecpar->coded_side_data[i]; ++#endif + if (side_data.type != AV_PKT_DATA_MASTERING_DISPLAY_METADATA) + continue; + diff --git a/srcpkgs/qt5-webengine/patches/0202-more-ffmpeg8.patch b/srcpkgs/qt5-webengine/patches/0202-more-ffmpeg8.patch new file mode 100644 index 00000000000000..61955b127d056d --- /dev/null +++ b/srcpkgs/qt5-webengine/patches/0202-more-ffmpeg8.patch @@ -0,0 +1,55 @@ +--- qtwebengine-5.15.17-lts.orig/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc ++++ qtwebengine-5.15.17-lts/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc +@@ -63,17 +63,17 @@ + hdr[1] |= 1; + + switch (audio_profile) { +- case FF_PROFILE_AAC_MAIN: ++ case AV_PROFILE_AAC_MAIN: + break; +- case FF_PROFILE_AAC_HE: +- case FF_PROFILE_AAC_HE_V2: +- case FF_PROFILE_AAC_LOW: ++ case AV_PROFILE_AAC_HE: ++ case AV_PROFILE_AAC_HE_V2: ++ case AV_PROFILE_AAC_LOW: + hdr[2] |= (1 << 6); + break; +- case FF_PROFILE_AAC_SSR: ++ case AV_PROFILE_AAC_SSR: + hdr[2] |= (2 << 6); + break; +- case FF_PROFILE_AAC_LTP: ++ case AV_PROFILE_AAC_LTP: + hdr[2] |= (3 << 6); + break; + default: +--- qtwebengine-5.15.17-lts.orig/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc ++++ qtwebengine-5.15.17-lts/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc +@@ -28,7 +28,7 @@ + // Set up reasonable aac parameters + memset(&test_parameters_, 0, sizeof(AVCodecParameters)); + test_parameters_.codec_id = AV_CODEC_ID_AAC; +- test_parameters_.profile = FF_PROFILE_AAC_MAIN; ++ test_parameters_.profile = AV_PROFILE_AAC_MAIN; + test_parameters_.ch_layout.nb_channels = 2; + test_parameters_.extradata = extradata_header_; + test_parameters_.extradata_size = sizeof(extradata_header_); +@@ -114,7 +114,7 @@ + + EXPECT_EQ(profile, kAacMainProfile); + +- test_parameters_.profile = FF_PROFILE_AAC_HE; ++ test_parameters_.profile = AV_PROFILE_AAC_HE; + FFmpegAACBitstreamConverter converter_he(&test_parameters_); + + test_packet.reset(new AVPacket()); +@@ -127,7 +127,7 @@ + + EXPECT_EQ(profile, kAacLowComplexityProfile); + +- test_parameters_.profile = FF_PROFILE_AAC_ELD; ++ test_parameters_.profile = AV_PROFILE_AAC_ELD; + FFmpegAACBitstreamConverter converter_eld(&test_parameters_); + + test_packet.reset(new AVPacket()); diff --git a/srcpkgs/qt5-webengine/template b/srcpkgs/qt5-webengine/template index 9deb785029ab40..592bcd694e53ff 100644 --- a/srcpkgs/qt5-webengine/template +++ b/srcpkgs/qt5-webengine/template @@ -1,7 +1,7 @@ # Template file for 'qt5-webengine' pkgname=qt5-webengine version=5.15.19 -revision=2 +revision=3 _version="${version}-lts" _chromium_commit=6d29e9cfcfffa7632cc3858ceaf8940677ba9c91 archs="x86_64* i686* armv[67]* ppc64* aarch64*" @@ -19,7 +19,7 @@ hostmakedepends="qt5-qmake gperf ninja qt5-host-tools flex pkg-config nodejs libjpeg-turbo-devel libpng-devel libwebp-devel freetype-devel harfbuzz-devel python3-html5lib" makedepends="qt5-webchannel-devel qt5-location-devel qt5-tools-devel qt5-devel - qt5-declarative-devel libevent-devel snappy-devel libicu78-devel ffmpeg6-devel + qt5-declarative-devel libevent-devel snappy-devel libicu78-devel ffmpeg-devel libwebp-devel opus-devel cups-devel nss-devel minizip-devel libxslt-devel libvpx-devel libXtst-devel libXcursor-devel libXcomposite-devel harfbuzz-devel lcms2-devel protobuf-devel pulseaudio-devel From 6977869117d575dbc94c2597a9f4fdf34a2b5044 Mon Sep 17 00:00:00 2001 From: zlice Date: Tue, 23 Dec 2025 10:14:10 -0500 Subject: [PATCH 090/115] qt6-pdf: revbump for ffmpeg9 --- srcpkgs/qt6-pdf/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/qt6-pdf/template b/srcpkgs/qt6-pdf/template index 900d9c13dafe3b..72d74aa02c86f5 100644 --- a/srcpkgs/qt6-pdf/template +++ b/srcpkgs/qt6-pdf/template @@ -1,7 +1,7 @@ # Template file for 'qt6-pdf' pkgname=qt6-pdf version=6.11.2 -revision=1 +revision=2 build_style=cmake configure_args="-DQT_FEATURE_qtpdf_build=ON -DQT_FEATURE_qtpdf_widgets_build=ON @@ -14,7 +14,7 @@ hostmakedepends="qt6-base-devel perl pkg-config nodejs python3-html5lib makedepends="qt6-base-private-devel qt6-declarative-private-devel qt6-svg-devel zlib-devel sqlite-devel libopenjpeg2-devel libglib-devel eudev-libudev-devel openh264-devel - pciutils-devel opus-devel libxslt-devel libxml2-devel ffmpeg6-devel + pciutils-devel opus-devel libxslt-devel libxml2-devel ffmpeg-devel lcms2-devel libwebp-devel icu-devel snappy-devel libevent-devel libvpx-devel minizip-devel tiff-devel libpng-devel harfbuzz-devel freetype-devel libjpeg-turbo-devel nss-devel libxshmfence-devel" From 4239cfa6ee4a81af9329a768eef10db6379a1f5d Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:34:11 -0500 Subject: [PATCH 091/115] czkawka: revbump for ffmpeg9 --- srcpkgs/czkawka/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/czkawka/template b/srcpkgs/czkawka/template index d4e7770c09549d..e7ab20f843d170 100644 --- a/srcpkgs/czkawka/template +++ b/srcpkgs/czkawka/template @@ -1,12 +1,12 @@ # Template file for 'czkawka' pkgname=czkawka version=12.0.2 -revision=1 +revision=2 build_style=cargo configure_args="--bin czkawka_cli --bin czkawka_gui --bin krokiet --features heif,libraw,libavif" hostmakedepends="pkg-config" makedepends="libdav1d-devel libheif-devel gtk4-devel libraw-devel libavif-devel" -depends="ffmpeg6" +depends="ffmpeg" checkdepends="dbus xvfb-run" short_desc="App to find duplicates, empty folders, similar images, etc" maintainer="Orphaned " From b555f23b17a1860898794eed835c987bdcdf72cf Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:34:34 -0500 Subject: [PATCH 092/115] dlib: revbump for ffmpeg9 --- srcpkgs/dlib/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/dlib/template b/srcpkgs/dlib/template index f72b89e24919da..bc2889182568e2 100644 --- a/srcpkgs/dlib/template +++ b/srcpkgs/dlib/template @@ -1,14 +1,14 @@ # Template file for 'dlib' pkgname=dlib version=20.0 -revision=2 +revision=3 build_style=cmake # arm6/7 need helper build_helper=python3 configure_args="-DBUILD_SHARED_LIBS=ON" hostmakedepends="pkg-config python3-devel python3-setuptools python3-distutils-extra python3-packaging-bootstrap" -makedepends="libjpeg-turbo-devel libpng-devel zlib-devel ffmpeg6-devel cblas-devel +makedepends="libjpeg-turbo-devel libpng-devel zlib-devel ffmpeg-devel cblas-devel $(vopt_if openblas openblas-devel) $(vopt_if x11 libX11-devel) python3-pybind11 python3" short_desc="Modern C++ toolkit containing machine learning algorithms and tools" maintainer="Felix Hanley " From d6bc64ceca6be3c34a3c389d525c0ae5e742197f Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:34:50 -0500 Subject: [PATCH 093/115] freerdp: revbump for ffmpeg9 --- srcpkgs/freerdp/template | 4 ++-- srcpkgs/libfreerdp3 | 2 +- srcpkgs/libfreerdp3-server | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/freerdp/template b/srcpkgs/freerdp/template index c82304b8bdb6cb..9a0a7defdaefe1 100644 --- a/srcpkgs/freerdp/template +++ b/srcpkgs/freerdp/template @@ -1,7 +1,7 @@ # Template file for 'freerdp' pkgname=freerdp version=3.31.1 -revision=1 +revision=2 build_style=cmake build_helper=qemu configure_args="-Wno-dev -DCMAKE_BUILD_TYPE=Release @@ -27,7 +27,7 @@ makedepends="alsa-lib-devel cups-devel fuse3-devel icu-devel libXcursor-devel libXdamage-devel libXinerama-devel libXrandr-devel libXv-devel pam-devel libjpeg-turbo-devel libusb-devel libxkbfile-devel mit-krb5-devel openssl-devel pulseaudio-devel uriparser-devel $(vopt_if aad cJSON-devel) - $(vopt_if ffmpeg ffmpeg6-devel cairo-devel) $(vopt_if sdl3 SDL3_ttf-devel) + $(vopt_if ffmpeg ffmpeg-devel cairo-devel) $(vopt_if sdl3 SDL3_ttf-devel) $(vopt_if smartcard 'pcsclite-devel pkcs11-helper-devel') $(vopt_if webview libwebkit2gtk41-devel) libfido2-devel" short_desc="Free RDP (Remote Desktop Protocol) client" diff --git a/srcpkgs/libfreerdp3 b/srcpkgs/libfreerdp3 index d8e6da3ebcadf3..ff5b2c64c02a44 120000 --- a/srcpkgs/libfreerdp3 +++ b/srcpkgs/libfreerdp3 @@ -1 +1 @@ -freerdp3 \ No newline at end of file +freerdp \ No newline at end of file diff --git a/srcpkgs/libfreerdp3-server b/srcpkgs/libfreerdp3-server index d8e6da3ebcadf3..ff5b2c64c02a44 120000 --- a/srcpkgs/libfreerdp3-server +++ b/srcpkgs/libfreerdp3-server @@ -1 +1 @@ -freerdp3 \ No newline at end of file +freerdp \ No newline at end of file From a8409b84a76a05893009fe4769b9a04a1f29878d Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:36:13 -0500 Subject: [PATCH 094/115] mgba: revbump for ffmpeg9 --- srcpkgs/mgba/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/mgba/template b/srcpkgs/mgba/template index 8685ed6bcaa858..191b65df6c4959 100644 --- a/srcpkgs/mgba/template +++ b/srcpkgs/mgba/template @@ -1,10 +1,10 @@ # Template file for 'mgba' pkgname=mgba version=0.10.5 -revision=1 +revision=2 build_style=cmake hostmakedepends="pkg-config qt5-host-tools qt5-qmake desktop-file-utils" -makedepends="SDL2-devel ffmpeg6-devel libedit-devel libepoxy-devel libmagick-devel +makedepends="SDL2-devel ffmpeg-devel libedit-devel libepoxy-devel libmagick-devel libzip-devel qt5-multimedia-devel qt5-tools-devel" short_desc="Game Boy Advance emulator written in C" maintainer="fanyx " From 193158c91bd1bc3c1a590f554d8e3a1b0c5fc3a2 Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:36:49 -0500 Subject: [PATCH 095/115] opencv: revbump for ffmpeg8 --- srcpkgs/opencv/patches/ffmpeg8.patch | 38 ++++++++++++++++++++++++++++ srcpkgs/opencv/template | 4 +-- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/opencv/patches/ffmpeg8.patch diff --git a/srcpkgs/opencv/patches/ffmpeg8.patch b/srcpkgs/opencv/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..c21e56e6d93963 --- /dev/null +++ b/srcpkgs/opencv/patches/ffmpeg8.patch @@ -0,0 +1,38 @@ +--- a/modules/videoio/src/cap_ffmpeg_impl.hpp ++++ b/modules/videoio/src/cap_ffmpeg_impl.hpp +@@ -685,8 +685,12 @@ + if( video_st ) + { + #ifdef CV_FFMPEG_CODECPAR ++// avcodec_close removed in FFmpeg release 8.0 ++# if (LIBAVCODEC_BUILD < CALC_FFMPEG_VERSION(61, 9, 108)) ++ + avcodec_close( context ); + #endif ++#endif + video_st = NULL; + } + +@@ -2005,7 +2009,21 @@ + rotation_angle = 0; + #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(57, 68, 100) + const uint8_t *data = 0; ++ // av_stream_get_side_data removed in FFmpeg release 8.0 ++# if (LIBAVCODEC_BUILD < CALC_FFMPEG_VERSION(61, 9, 108)) + data = av_stream_get_side_data(video_st, AV_PKT_DATA_DISPLAYMATRIX, NULL); ++# else ++ AVPacketSideData* sd = video_st->codecpar->coded_side_data; ++ int nb_sd = video_st->codecpar->nb_coded_side_data; ++ if (sd && nb_sd > 0) ++ { ++ const AVPacketSideData* mtx = av_packet_side_data_get(sd, nb_sd, AV_PKT_DATA_DISPLAYMATRIX); ++ if (mtx) ++ { ++ data = mtx->data; ++ } ++ } ++# endif + if (data) + { + rotation_angle = -cvRound(av_display_rotation_get((const int32_t*)data)); + diff --git a/srcpkgs/opencv/template b/srcpkgs/opencv/template index af369793136814..e36f6b1cfafdda 100644 --- a/srcpkgs/opencv/template +++ b/srcpkgs/opencv/template @@ -1,7 +1,7 @@ # Template file for 'opencv' pkgname=opencv version=4.12.0 -revision=2 +revision=3 create_wrksrc=yes build_wrksrc=${pkgname}-${version} build_style=cmake @@ -13,7 +13,7 @@ configure_args="-DENABLE_PRECOMPILED_HEADERS=OFF -DWITH_OPENMP=ON -DBUILD_opencv_wechat_qrcode=OFF -DBUILD_opencv_rgbd=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF" hostmakedepends="pkg-config eigen python3-numpy python3-setuptools" -makedepends="ffmpeg6-devel libpng-devel libjpeg-turbo-devel tiff-devel +makedepends="ffmpeg8-devel libpng-devel libjpeg-turbo-devel tiff-devel jasper-devel ocl-icd-devel libgomp-devel libopenexr-devel gtk+3-devel libgphoto2-devel gst-plugins-base1-devel openblas-devel python3-numpy python3-devel" From 2275d953c635f2ac61601a235d96c9025b73eeac Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:38:09 -0500 Subject: [PATCH 096/115] qt5: remove unused ffmpeg-devel --- srcpkgs/qt5/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/qt5/template b/srcpkgs/qt5/template index aacbc0ceb6c552..ee8a7d2598ab49 100644 --- a/srcpkgs/qt5/template +++ b/srcpkgs/qt5/template @@ -3,14 +3,14 @@ # revbump libqtxdg after bumping patch version pkgname=qt5 version=5.15.11+20231124 -revision=6 +revision=7 # commit 4765fa1df7a837db9c1f89c4da0dd76b74bb5fab # base repo: https://invent.kde.org/qt/qt/qt5 metapackage=yes hostmakedepends="cmake clang19 flex perl glib-devel pkg-config python3 re2c ruby which" makedepends="clang19-devel SDL2-devel Vulkan-Headers alsa-lib-devel double-conversion-devel - eudev-libudev-devel ffmpeg6-devel freetds-devel glib-devel gst-plugins-base1-devel + eudev-libudev-devel freetds-devel glib-devel gst-plugins-base1-devel gtk+3-devel icu-devel libXv-devel libbluetooth-devel libcap-devel libinput-devel libmng-devel libmariadbclient-devel libproxy-devel libvpx-devel libwebp-devel libxkbcommon-devel From ce767f46ad2e5589522b719e43fb9192f7eaf46d Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:38:32 -0500 Subject: [PATCH 097/115] qt6-multimedia: revbump for ffmpeg9 --- srcpkgs/qt6-multimedia/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/qt6-multimedia/template b/srcpkgs/qt6-multimedia/template index dfef9c314cb8cd..068512ab8999a1 100644 --- a/srcpkgs/qt6-multimedia/template +++ b/srcpkgs/qt6-multimedia/template @@ -1,13 +1,13 @@ # Template file for 'qt6-multimedia' pkgname=qt6-multimedia version=6.11.2 -revision=1 +revision=2 build_style=cmake configure_args="-DQT_FEATURE_gstreamer=ON" hostmakedepends="perl qt6-declarative-host-tools pkg-config qt6-shadertools" makedepends="qt6-base-private-devel qt6-declarative-private-devel qt6-quick3d-private-devel qt6-shadertools-devel - pulseaudio-devel ffmpeg6-devel libva-devel + pulseaudio-devel ffmpeg-devel libva-devel libglib-devel gst-plugins-bad1-devel gst-plugins-base1-devel" short_desc="Cross-platform application and UI framework - multimedia" maintainer="John " From 1c21f1610d8791b73414b80559855e9ba6266485 Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:38:53 -0500 Subject: [PATCH 098/115] shotcut: revbump for ffmpeg9 --- srcpkgs/shotcut/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/shotcut/template b/srcpkgs/shotcut/template index 3ace5bc0497b6a..4976930d3ecf5d 100644 --- a/srcpkgs/shotcut/template +++ b/srcpkgs/shotcut/template @@ -1,14 +1,14 @@ # Template file for 'shotcut' pkgname=shotcut version=26.8.1 -revision=2 +revision=3 build_style=cmake configure_args="-DSHOTCUT_VERSION=${version}" hostmakedepends="pkg-config qt6-base qt6-tools" makedepends="mlt7-devel qt6-declarative-devel qt6-multimedia-devel qt6-websockets-devel qt6-plugin-mysql qt6-plugin-odbc qt6-plugin-pgsql qt6-plugin-sqlite qt6-charts-devel qt6-declarative-private-devel" -depends="ffmpeg6 frei0r-plugins qt6-declarative" +depends="ffmpeg frei0r-plugins qt6-declarative" short_desc="Free, open source, cross-platform video editor" maintainer="Orphaned " license="GPL-3.0-or-later" From d4be20671dadd14cb0eb3c3b50b663d868617f59 Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:39:09 -0500 Subject: [PATCH 099/115] vhs: revbump for ffmpeg9 --- srcpkgs/vhs/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/vhs/template b/srcpkgs/vhs/template index f74c2a12a581cc..db17a43e127790 100644 --- a/srcpkgs/vhs/template +++ b/srcpkgs/vhs/template @@ -1,12 +1,12 @@ # Template file for 'vhs' pkgname=vhs version=0.11.0 -revision=1 +revision=2 build_style=go build_helper=qemu go_import_path="github.com/charmbracelet/vhs" go_ldflags="-X main.Version=v${version}" -depends="ffmpeg6 ttyd" +depends="ffmpeg ttyd" short_desc="Your CLI home video recorder" maintainer="tranzystorekk " license="MIT" From d53ae8306101b40cb4b3dd65dc9dfeaebbb7c697 Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:39:27 -0500 Subject: [PATCH 100/115] vice: revbump for ffmpeg9 --- srcpkgs/vice/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/vice/template b/srcpkgs/vice/template index a18c1e1b85f0d4..2fa54fb343298c 100644 --- a/srcpkgs/vice/template +++ b/srcpkgs/vice/template @@ -1,7 +1,7 @@ # Template file for 'vice' pkgname=vice version=3.9 -revision=1 +revision=2 build_style=gnu-configure configure_args="--enable-cpuhistory --enable-x64 --disable-pdf-docs --libdir=/usr/lib$XBPS_TARGET_WORDSIZE $(vopt_enable sdl2 sdlui2) @@ -12,7 +12,7 @@ hostmakedepends="pkg-config flex dos2unix xa perl glib-devel xdg-utils" makedepends="zlib-devel readline-devel libpng-devel glew-devel alsa-lib-devel libcurl-devel libevdev-devel $(vopt_if sdl2 SDL2_mixer-devel) $(vopt_if sdl2 SDL2-devel) $(vopt_if gtk3 gtk+3-devel) $(vopt_if gtk3 pulseaudio-devel) - $(vopt_if ffmpeg ffmpeg6-devel)" + $(vopt_if ffmpeg ffmpeg-devel)" short_desc="Emulator for C64, C128, CBM-II, PET, VIC20, Plus4 and C16" maintainer="Orphaned " license="GPL-2.0-or-later" From dcb2f5a08043f9897ac1e1b7e1d6b8426c2c0c30 Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 10:40:02 -0500 Subject: [PATCH 101/115] vokoscreenNG: revbump for ffmpeg9 --- srcpkgs/vokoscreenNG/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/vokoscreenNG/template b/srcpkgs/vokoscreenNG/template index d183d4d52d318b..2c96d988c925f4 100644 --- a/srcpkgs/vokoscreenNG/template +++ b/srcpkgs/vokoscreenNG/template @@ -1,14 +1,14 @@ # Template file for 'vokoscreenNG' pkgname=vokoscreenNG version=4.10.0 -revision=1 +revision=2 build_style=qmake build_wrksrc="src" hostmakedepends="pkg-config qt6-base-devel qt6-tools-devel" makedepends="alsa-lib-devel libX11-devel libXrandr-devel pipewire-devel pulseaudio-devel gst-plugins-base1-devel qt6-multimedia-devel xdg-desktop-portal gstreamer1-devel" -depends="ffmpeg6 gstreamer1-pipewire gst-plugins-ugly1 gst-plugins-good1" +depends="ffmpeg gstreamer1-pipewire gst-plugins-ugly1 gst-plugins-good1" short_desc="Easy to use screencast creator" maintainer="Duncaen " license="GPL-2.0-only" From 0286467e93d4c3e97773835d8d8328c5ff723bfe Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 24 Dec 2025 14:42:21 -0500 Subject: [PATCH 102/115] srb2: revbump for libgme 0.6.4 --- srcpkgs/srb2/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/srb2/template b/srcpkgs/srb2/template index 96b6f272818531..6e02dd65978713 100644 --- a/srcpkgs/srb2/template +++ b/srcpkgs/srb2/template @@ -1,7 +1,7 @@ # Template file for 'srb2' pkgname=srb2 version=2.2.15 -revision=1 +revision=2 create_wrksrc=true build_wrksrc="SRB2-SRB2_release_${version}" build_style=gnu-makefile From 9c952566b002c8c24c7a5ccd049ee75da7238f28 Mon Sep 17 00:00:00 2001 From: zlice Date: Mon, 27 Jul 2026 20:02:03 -0400 Subject: [PATCH 103/115] gpu-screen-recorder: revbump for ffmpeg9 --- srcpkgs/gpu-screen-recorder/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/gpu-screen-recorder/template b/srcpkgs/gpu-screen-recorder/template index 05ec396bceefab..dcc4d3d62caa09 100644 --- a/srcpkgs/gpu-screen-recorder/template +++ b/srcpkgs/gpu-screen-recorder/template @@ -1,7 +1,7 @@ # Template file for 'gpu-screen-recorder' pkgname=gpu-screen-recorder version=5.12.5 -revision=1 +revision=2 build_style=meson hostmakedepends="meson ninja pkg-config wayland-devel" makedepends="ffmpeg-devel libcap-devel libdrm-devel libglvnd-devel From 15e4b6cb37836681d0955da136015ef377abe16d Mon Sep 17 00:00:00 2001 From: zlice Date: Mon, 27 Jul 2026 20:02:03 -0400 Subject: [PATCH 104/115] eden: revbump for ffmpeg9 --- srcpkgs/eden/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/eden/template b/srcpkgs/eden/template index 67859ada6d41f2..4e9118da2e2207 100644 --- a/srcpkgs/eden/template +++ b/srcpkgs/eden/template @@ -1,7 +1,7 @@ # Template file for 'eden' pkgname=eden version=0.2.1 -revision=2 +revision=3 archs="x86_64* aarch64*" build_style=cmake configure_args="-DBUILD_TESTING=OFF -DDYNARMIC_TESTS=OFF @@ -13,7 +13,7 @@ configure_args="-DBUILD_TESTING=OFF -DDYNARMIC_TESTS=OFF -DENABLE_LTO=ON -DENABLE_QT_TRANSLATION=ON" hostmakedepends="cmake glslang mold pkg-config qt6-base qt6-tools" makedepends="SDL2-devel SPIRV-Headers SPIRV-Tools-devel Vulkan-Headers - Vulkan-Utility-Libraries boost-devel-minimal ffmpeg6-devel fmt-devel json-c++ + Vulkan-Utility-Libraries boost-devel-minimal ffmpeg-devel fmt-devel json-c++ libenet-devel libgamemode-devel liblz4-devel libva-devel libzstd-devel mbedtls-devel opus-devel qt6-base-private-devel zlib-devel qt6-charts-devel qt6-qt5compat-devel quazip-qt6-devel" From b18bc95b24b027b4753e5d941c12dabacdea7077 Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 2 Sep 2026 11:32:46 -0400 Subject: [PATCH 105/115] vlc: revbump for ffmpeg9 --- srcpkgs/vlc/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/vlc/template b/srcpkgs/vlc/template index 8e0e47a40c2179..b785da717cc022 100644 --- a/srcpkgs/vlc/template +++ b/srcpkgs/vlc/template @@ -1,7 +1,7 @@ # Template file for 'vlc' pkgname=vlc version=3.0.23 -revision=6 +revision=7 build_style=gnu-configure configure_args="--disable-gme --disable-libtar --enable-jack --enable-live555 --disable-fluidsynth --enable-dvdread From 51dfa7a3298175d10f1993b5c15656d656523e1d Mon Sep 17 00:00:00 2001 From: zlice Date: Thu, 3 Sep 2026 11:18:34 -0400 Subject: [PATCH 106/115] opera: revbump for ffmpeg9 --- srcpkgs/opera/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/opera/template b/srcpkgs/opera/template index 0f5e16af30066b..22758f35151a0f 100644 --- a/srcpkgs/opera/template +++ b/srcpkgs/opera/template @@ -1,10 +1,10 @@ # Template file for 'opera' pkgname=opera version=134.0.5954.46 -revision=1 +revision=2 archs="x86_64 aarch64" create_wrksrc=yes -depends="ffmpeg6 desktop-file-utils hicolor-icon-theme libcanberra-gtk3 gsettings-desktop-schemas" +depends="ffmpeg desktop-file-utils hicolor-icon-theme libcanberra-gtk3 gsettings-desktop-schemas" short_desc="Fast, secure, easy to use browser" maintainer="mobinmob " license="custom:Proprietary" From 8729187ff580bca24a9fa76e44c639ee764f456e Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 16 Sep 2026 19:20:53 -0400 Subject: [PATCH 107/115] libopenshot: revbump for ffmpeg8 --- srcpkgs/libopenshot/patches/ffmpeg8.patch | 11 +++++++++++ srcpkgs/libopenshot/template | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/libopenshot/patches/ffmpeg8.patch diff --git a/srcpkgs/libopenshot/patches/ffmpeg8.patch b/srcpkgs/libopenshot/patches/ffmpeg8.patch new file mode 100644 index 00000000000000..48182456e4f8b0 --- /dev/null +++ b/srcpkgs/libopenshot/patches/ffmpeg8.patch @@ -0,0 +1,11 @@ +--- a/src/FFmpegWriter.cpp ++++ b/src/FFmpegWriter.cpp +@@ -1511,7 +1511,7 @@ + switch (video_codec_ctx->codec_id) { + case AV_CODEC_ID_H264: + video_codec_ctx->max_b_frames = 0; // At least this GPU doesn't support b-frames +- video_codec_ctx->profile = FF_PROFILE_H264_BASELINE | FF_PROFILE_H264_CONSTRAINED; ++ video_codec_ctx->profile = AV_PROFILE_H264_BASELINE | AV_PROFILE_H264_BASELINE; + av_opt_set(video_codec_ctx->priv_data, "preset", "slow", 0); + av_opt_set(video_codec_ctx->priv_data, "tune", "zerolatency", 0); + av_opt_set(video_codec_ctx->priv_data, "vprofile", "baseline", AV_OPT_SEARCH_CHILDREN); diff --git a/srcpkgs/libopenshot/template b/srcpkgs/libopenshot/template index 6bbec8b7678974..fcc9aebe0d3b46 100644 --- a/srcpkgs/libopenshot/template +++ b/srcpkgs/libopenshot/template @@ -1,13 +1,13 @@ # Template file for 'libopenshot' pkgname=libopenshot version=0.4.0 -revision=3 +revision=4 build_style=cmake # Builds fail with Ruby-2.4.1 configure_args="-DENABLE_RUBY=OFF -DUSE_SYSTEM_JSONCPP=ON" hostmakedepends="swig doxygen ruby python3 python3-setuptools pkg-config qt5-qmake qt5-host-tools" -makedepends="python3-devel ffmpeg6-devel libmagick-devel qt5-devel libgomp-devel +makedepends="python3-devel ffmpeg8-devel libmagick-devel qt5-devel libgomp-devel libopenshot-audio-devel qt5-multimedia-devel unittest-cpp zeromq-devel cppzmq jsoncpp-devel qt5-svg-devel" depends="python3" From c6516d12f7c02bf8437e213a7e01d63eda42cdea Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 16 Sep 2026 19:21:04 -0400 Subject: [PATCH 108/115] openshot: revbump for ffmpeg8 --- srcpkgs/openshot/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/openshot/template b/srcpkgs/openshot/template index 56f188f569c199..c4545a8a65ad52 100644 --- a/srcpkgs/openshot/template +++ b/srcpkgs/openshot/template @@ -1,10 +1,10 @@ # Template file for 'openshot' pkgname=openshot version=3.3.0 -revision=1 +revision=2 build_style=python3-module hostmakedepends="python3 python3-setuptools" -makedepends="ffmpeg6-devel python3-PyQt5" +makedepends="ffmpeg8-devel python3-PyQt5" depends="ImageMagick libopenshot python3-PyQt5-svg python3-PyQt5-webkit python3-httplib2 python3-pyzmq python3-requests" short_desc="Open-source, non-linear video editor for Linux" From a67f1d33b9e140c5490141764d10e3146c4f0a05 Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 16 Sep 2026 19:24:07 -0400 Subject: [PATCH 109/115] python3-pydub: revbump for ffmpeg9 --- srcpkgs/python3-pydub/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/python3-pydub/template b/srcpkgs/python3-pydub/template index 4d8fd97cd0a174..dc60e86ff37487 100644 --- a/srcpkgs/python3-pydub/template +++ b/srcpkgs/python3-pydub/template @@ -1,10 +1,10 @@ # Template file for 'python3-pydub' pkgname=python3-pydub version=0.25.1 -revision=1 +revision=2 build_style=python3-module hostmakedepends="python3-setuptools_scm" -depends="python3-PyAudio ffmpeg6" +depends="python3-PyAudio ffmpeg" short_desc="Manipulate audio with a simple high level interface" maintainer="Mateusz Sylwestrzak " license="MIT" From f68c877b7f93106c41be2e2c039a1f925a65dc44 Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 16 Sep 2026 19:24:32 -0400 Subject: [PATCH 110/115] songrec: revbump for ffmpeg9 --- srcpkgs/songrec/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/songrec/template b/srcpkgs/songrec/template index 65f699756c9495..2737911ad8ece7 100644 --- a/srcpkgs/songrec/template +++ b/srcpkgs/songrec/template @@ -1,12 +1,12 @@ # Template file for 'songrec' pkgname=songrec version=0.7.5 -revision=1 +revision=2 build_style=cargo hostmakedepends="clang22 pkg-config glib-devel blueprint-compiler gettext" makedepends="alsa-lib-devel dbus-devel libadwaita-devel libsoup3-devel openssl-devel pipewire-devel pulseaudio-devel" -depends="ffmpeg6" +depends="ffmpeg" short_desc="Open-source Shazam client" maintainer="Lydia Sobot " license="GPL-3.0-only" From 4885926eae02e31a16d367c855c9607f719187d7 Mon Sep 17 00:00:00 2001 From: zlice Date: Thu, 17 Sep 2026 16:50:21 -0400 Subject: [PATCH 111/115] opencolorio: update to 2.5.2 --- srcpkgs/blender/files/x86-64-v2.patch | 11 ----------- srcpkgs/opencolorio/template | 4 ++-- 2 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 srcpkgs/blender/files/x86-64-v2.patch diff --git a/srcpkgs/blender/files/x86-64-v2.patch b/srcpkgs/blender/files/x86-64-v2.patch deleted file mode 100644 index 258446a3ee083a..00000000000000 --- a/srcpkgs/blender/files/x86-64-v2.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/build_files/cmake/macros.cmake -+++ b/build_files/cmake/macros.cmake -@@ -548,7 +548,7 @@ macro(TEST_SSE_SUPPORT - - # message(STATUS "Detecting SSE support") - if(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_COMPILER_ID MATCHES "Clang")) -- set(${_sse42_flags} "-march=x86-64-v2") -+ set(${_sse42_flags} "") - elseif(MSVC) - # MSVC has no specific build flags for SSE42, but when using intrinsics it will - # generate the right instructions. diff --git a/srcpkgs/opencolorio/template b/srcpkgs/opencolorio/template index 915e8b2a68376f..5aa0047f65b4db 100644 --- a/srcpkgs/opencolorio/template +++ b/srcpkgs/opencolorio/template @@ -1,6 +1,6 @@ # Template file for 'opencolorio' pkgname=opencolorio -version=2.5.0 +version=2.5.2 revision=1 build_style=cmake configure_args="-DCMAKE_CONFIGURATION_TYPES=None @@ -18,7 +18,7 @@ license="custom:openimageio" homepage="https://opencolorio.org" changelog="https://raw.githubusercontent.com/AcademySoftwareFoundation/OpenColorIO/master/ChangeLog" distfiles="https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v${version}.tar.gz" -checksum=124e2bfa8a9071959d6ddbb64ffbf78d3f6fe3c923ae23e96a6bbadde1af55b6 +checksum=722601e01b78b7a12da4829cb450674935f404b0e508f3f20046fa77570e3272 make_check=no # A couple tests fail. case "$XBPS_TARGET_MACHINE" in From fe577963ce574105970fad71576c5f560da01451 Mon Sep 17 00:00:00 2001 From: zlice Date: Thu, 17 Sep 2026 16:50:49 -0400 Subject: [PATCH 112/115] openimagedenoise: update to 2.5.1 --- srcpkgs/openimagedenoise/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/openimagedenoise/template b/srcpkgs/openimagedenoise/template index 812355b21e4caf..f4a3c5a02d9dab 100644 --- a/srcpkgs/openimagedenoise/template +++ b/srcpkgs/openimagedenoise/template @@ -1,18 +1,18 @@ # Template file for 'openimagedenoise' pkgname=openimagedenoise -version=2.3.0 +version=2.5.1 revision=1 -archs="x86_64*" +archs="x86_64* aarch64*" build_style=cmake hostmakedepends="ispc python3" makedepends="tbb-devel openimageio-devel" short_desc="Intel(R) Open Image Denoise library" maintainer="Orphaned " license="Apache-2.0" -homepage="https://openimagedenoise.github.io" +homepage="https://openimagedenoise.org" changelog="https://github.com/OpenImageDenoise/oidn/blob/master/CHANGELOG.md" distfiles="https://github.com/OpenImageDenoise/oidn/releases/download/v${version}/oidn-${version}.src.tar.gz" -checksum=cce3010962ec84e0ba1acd8c9055a3d8de402fedb1b463517cfeb920a276e427 +checksum=e71fd043a70f1cc80e301d1b90df6c1f536098c4dd94baa612742f6db3369c36 do_check() { build/oidnTest From cbaf9a91da408939e835920856160b94f00df524 Mon Sep 17 00:00:00 2001 From: zlice Date: Thu, 17 Sep 2026 16:51:03 -0400 Subject: [PATCH 113/115] opengpl: update to 0.7.1 --- srcpkgs/openpgl/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/openpgl/template b/srcpkgs/openpgl/template index 64b19c6a164f20..d86aee08af978e 100644 --- a/srcpkgs/openpgl/template +++ b/srcpkgs/openpgl/template @@ -1,8 +1,8 @@ # Template file for 'openpgl' pkgname=openpgl -version=0.5.0 -revision=2 -archs="x86_64*" +version=0.7.1 +revision=1 +archs="x86_64* aarch64*" build_style=cmake configure_args="-DOPENPGL_BUILD_TOOLS=On" makedepends="tbb-devel" @@ -11,7 +11,7 @@ maintainer="Đoàn Trần Công Danh " license="Apache-2.0" homepage="https://github.com/OpenPathGuidingLibrary/openpgl" distfiles="https://github.com/OpenPathGuidingLibrary/openpgl/archive/refs/tags/v${version}.tar.gz" -checksum=1ec806d434d45e43e098f82ee9be0cb74928343898c57490b34ff80584e9805a +checksum=d62d24241232a526491328f341df9add274fc84ae9818470d3edb5ae6141ac63 openpgl-devel_package() { depends="${sourcepkg}>=${version}_${revision}" From f1096c2fb5f43de4954142849543d8356bb0e220 Mon Sep 17 00:00:00 2001 From: zlice Date: Thu, 17 Sep 2026 16:51:56 -0400 Subject: [PATCH 114/115] New package: sse2neon-1.9.1 --- srcpkgs/sse2neon/template | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 srcpkgs/sse2neon/template diff --git a/srcpkgs/sse2neon/template b/srcpkgs/sse2neon/template new file mode 100644 index 00000000000000..084839e809d1d0 --- /dev/null +++ b/srcpkgs/sse2neon/template @@ -0,0 +1,36 @@ +# Template file for 'sse2neon' +pkgname=sse2neon +version=1.9.1 +revision=1 +build_style=gnu-makefile +short_desc="Translator for Intel SSE to Aarch64 NEON" +maintainer="zlice " +license="MIT" +homepage="https://github.com/DLTcollab/sse2neon" +changelog="https://github.com/DLTcollab/sse2neon/commits/master" +distfiles="https://github.com/DLTcollab/sse2neon/archive/refs/tags/v${version}.tar.gz" +checksum=6b70e7cb8c5ce4641002b85deaafe97efdf9ade9b49884edeaf678b35f0e132f +# some tests fail like cvttps_epi32(_nan) +make_check=no + +# to try make check - use this +#case "$XBPS_TARGET_MACHINE" in +#x86_64*) +# hostmakedepends+=" qemu-system-aarch64" +# if [ "$XBPS_TARGET_LIBC" = "musl" ]; then +# hostmakedepends+=" cross-aarch64-linux-musl" +# else +# hostmakedepends+=" cross-aarch64-linux-gnu" +# fi +# export CROSS_COMPILE="${XBPS_TARGET_TRIPLET}" ;; +#esac + +# this is just a header file +do_build() { + echo nop +} + +do_install() { + vinstall sse2neon.h 644 usr/include/ + vlicense LICENSE +} From af7a2e3b33d4bd18d8237daade752a12f8b27363 Mon Sep 17 00:00:00 2001 From: zlice Date: Thu, 17 Sep 2026 16:53:08 -0400 Subject: [PATCH 115/115] blender: update to 5.2.2 --- .../0003-fix-incorrect-jacobiSvd-calls.patch | 88 +++++++++++++++++++ .../patches/0004-dont-poison-off_t.patch | 28 ++++++ srcpkgs/blender/patches/cross.patch | 48 +++++----- srcpkgs/blender/patches/ffmpeg9.patch | 75 ++++++++++++++++ srcpkgs/blender/template | 32 +++---- 5 files changed, 229 insertions(+), 42 deletions(-) create mode 100644 srcpkgs/blender/patches/0003-fix-incorrect-jacobiSvd-calls.patch create mode 100644 srcpkgs/blender/patches/0004-dont-poison-off_t.patch create mode 100644 srcpkgs/blender/patches/ffmpeg9.patch diff --git a/srcpkgs/blender/patches/0003-fix-incorrect-jacobiSvd-calls.patch b/srcpkgs/blender/patches/0003-fix-incorrect-jacobiSvd-calls.patch new file mode 100644 index 00000000000000..2ec43b7d66d718 --- /dev/null +++ b/srcpkgs/blender/patches/0003-fix-incorrect-jacobiSvd-calls.patch @@ -0,0 +1,88 @@ +From f53cd37299952987315afdbee52280973d891df5 Mon Sep 17 00:00:00 2001 +From: Leon Marz +Date: Wed, 1 Apr 2026 20:44:14 +0200 +Subject: [PATCH 3/4] fix incorrect jacobiSvd calls + +--- + intern/dualcon/intern/octree.cpp | 3 +-- + intern/libmv/libmv/multiview/euclidean_resection.cc | 6 +++--- + intern/libmv/libmv/tracking/track_region.cc | 2 +- + intern/slim/intern/slim.cpp | 4 ++-- + 4 files changed, 7 insertions(+), 8 deletions(-) + +diff --git a/intern/dualcon/intern/octree.cpp b/intern/dualcon/intern/octree.cpp +index aac0418..f735f6a 100644 +--- a/intern/dualcon/intern/octree.cpp ++++ b/intern/dualcon/intern/octree.cpp +@@ -2183,8 +2183,7 @@ void Octree::countIntersection(Node *node, int height, int &nedge, int &ncell, i + /* from http://eigen.tuxfamily.org/bz/show_bug.cgi?id=257 */ + static void pseudoInverse(const Eigen::Matrix3f &a, Eigen::Matrix3f &result, float tolerance) + { +- const int Options = Eigen::ComputeFullU | Eigen::ComputeFullV; +- Eigen::JacobiSVD svd = a.jacobiSvd(); ++ Eigen::JacobiSVD svd = a.jacobiSvd(Eigen::ComputeFullU | Eigen::ComputeFullV); + + result = svd.matrixV() * + Eigen::Vector3f((svd.singularValues().array().abs() > tolerance) +diff --git a/intern/libmv/libmv/multiview/euclidean_resection.cc b/intern/libmv/libmv/multiview/euclidean_resection.cc +index 7d20e9d..1231613 100644 +--- a/intern/libmv/libmv/multiview/euclidean_resection.cc ++++ b/intern/libmv/libmv/multiview/euclidean_resection.cc +@@ -107,7 +107,7 @@ void AbsoluteOrientation(const Mat3X& X, const Mat3X& Xp, Mat3* R, Vec3* t) { + + // Find the unit quaternion q that maximizes qNq. It is the eigenvector + // corresponding to the lagest eigenvalue. +- Vec4 q = N.jacobiSvd().matrixU().col(0); ++ Vec4 q = N.jacobiSvd(Eigen::ComputeFullU).matrixU().col(0); + + // Retrieve the 3x3 rotation matrix. + Vec4 qq = q.array() * q.array(); +@@ -246,7 +246,7 @@ void EuclideanResectionAnsarDaniilidis(const Mat2X& x_camera, + } + + int num_lambda = num_points + 1; // Dimension of the null space of M. +- Mat V = M.jacobiSvd().matrixV().block( ++ Mat V = M.jacobiSvd(Eigen::ComputeFullV).matrixV().block( + 0, num_m_rows, num_m_columns, num_lambda); + + // TODO(vess): The number of constraint equations in K (num_k_rows) must be +@@ -303,7 +303,7 @@ void EuclideanResectionAnsarDaniilidis(const Mat2X& x_camera, + } + } + Vec L_sq = +- K.jacobiSvd().matrixV().col(num_k_columns - 1); ++ K.jacobiSvd(Eigen::ComputeFullV).matrixV().col(num_k_columns - 1); + + // Pivot on the largest element for numerical stability. Afterwards recover + // the sign of the lambda solution. +diff --git a/intern/libmv/libmv/tracking/track_region.cc b/intern/libmv/libmv/tracking/track_region.cc +index ec808ac..620367a 100644 +--- a/intern/libmv/libmv/tracking/track_region.cc ++++ b/intern/libmv/libmv/tracking/track_region.cc +@@ -940,7 +940,7 @@ struct AffineWarp { + } + + // TODO(keir): Check solution quality. +- Vec4 a = Q1.jacobiSvd().solve(Q2); ++ Vec4 a = Q1.jacobiSvd(Eigen::ComputeThinU | Eigen::ComputeThinV).solve(Q2); + parameters[2] = a[0]; + parameters[3] = a[1]; + parameters[4] = a[2]; +diff --git a/intern/slim/intern/slim.cpp b/intern/slim/intern/slim.cpp +index b42c5fd..fd0821d 100644 +--- a/intern/slim/intern/slim.cpp ++++ b/intern/slim/intern/slim.cpp +@@ -208,8 +208,8 @@ static inline void polar_svd(const Eigen::PlainObjectBase &A, + Eigen::PlainObjectBase &V) + { + using namespace std; +- Eigen::JacobiSVD svd; +- svd.compute(A); ++ Eigen::JacobiSVD svd; ++ svd.compute(A, Eigen::ComputeFullU | Eigen::ComputeFullV); + U = svd.matrixU(); + V = svd.matrixV(); + S = svd.singularValues(); +-- +2.55.0 + diff --git a/srcpkgs/blender/patches/0004-dont-poison-off_t.patch b/srcpkgs/blender/patches/0004-dont-poison-off_t.patch new file mode 100644 index 00000000000000..48a8f44d69ffe0 --- /dev/null +++ b/srcpkgs/blender/patches/0004-dont-poison-off_t.patch @@ -0,0 +1,28 @@ +From 417b4fa56701625fb727915913aad71fe758067c Mon Sep 17 00:00:00 2001 +From: Leon Marz +Date: Thu, 2 Apr 2026 20:01:59 +0200 +Subject: [PATCH 4/4] dont poison off_t + +--- + source/blender/blenloader/intern/readfile.hh | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/source/blender/blenloader/intern/readfile.hh b/source/blender/blenloader/intern/readfile.hh +index 4be9e53..b6d2a7a 100644 +--- a/source/blender/blenloader/intern/readfile.hh ++++ b/source/blender/blenloader/intern/readfile.hh +@@ -68,11 +68,6 @@ enum eFileDataFlag { + }; + ENUM_OPERATORS(eFileDataFlag) + +-/* Disallow since it's 32bit on ms-windows. */ +-#ifdef __GNUC__ +-# pragma GCC poison off_t +-#endif +- + /** + * General data used during a blend-file reading. + * +-- +2.55.0 + diff --git a/srcpkgs/blender/patches/cross.patch b/srcpkgs/blender/patches/cross.patch index d350e7681460dd..fa437a86e017f2 100644 --- a/srcpkgs/blender/patches/cross.patch +++ b/srcpkgs/blender/patches/cross.patch @@ -1,18 +1,16 @@ -using a bare target name instead of a generator allows cmake to wrap it in CROSSCOMPILING_EMULATOR - -diff -ur a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake ---- a/build_files/cmake/macros.cmake 2025-07-08 08:58:38.000000000 -0400 -+++ b/build_files/cmake/macros.cmake 2025-11-17 16:17:54.898589820 -0500 -@@ -1018,7 +1018,7 @@ +# using a bare target name instead of a generator allows cmake to wrap it in CROSSCOMPILING_EMULATOR +--- a/build_files/cmake/macros.cmake ++++ b/build_files/cmake/macros.cmake +@@ -1115,7 +1115,7 @@ add_custom_command( OUTPUT ${file_to} -- COMMAND "$" ${file_from} ${file_to} -+ COMMAND datatoc ${file_from} ${file_to} +- COMMAND "$" ${file_from} ${file_to} ${symbol_name_override} ++ COMMAND datatoc ${file_from} ${file_to} ${symbol_name_override} DEPENDS ${file_from} datatoc) set_source_files_properties(${file_to} PROPERTIES GENERATED TRUE) -@@ -1044,7 +1044,7 @@ +@@ -1139,7 +1139,7 @@ add_custom_command( OUTPUT ${_file_to} @@ -21,18 +19,22 @@ diff -ur a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake DEPENDS ${_file_from} datatoc) set_source_files_properties(${_file_to} PROPERTIES GENERATED TRUE) -@@ -1073,8 +1073,8 @@ +@@ -1176,12 +1176,12 @@ + add_custom_command( + OUTPUT ${_file_tmp} ${_file_meta} ${_file_info} ${_file_dep} + DEPFILE ${_file_dep} +- COMMAND "$" ${_file_from} ${_file_tmp} ${_file_meta} ${_file_info} ${_file_dep} ${_inc_list} ++ COMMAND shader_tool ${_file_from} ${_file_tmp} ${_file_meta} ${_file_info} ${_file_dep} ${_inc_list} + DEPENDS ${_file_from} shader_tool) add_custom_command( - OUTPUT ${_file_to} ${_file_meta} ${_file_info} -- COMMAND "$" ${_file_from} ${_file_tmp} ${_file_meta} ${_file_info} + OUTPUT ${_file_to} - COMMAND "$" ${_file_tmp} ${_file_to} -+ COMMAND glsl_preprocess ${_file_from} ${_file_tmp} ${_file_meta} ${_file_info} + COMMAND datatoc ${_file_tmp} ${_file_to} - DEPENDS ${_file_from} datatoc glsl_preprocess) + DEPENDS ${_file_tmp} datatoc) set_source_files_properties(${_file_tmp} PROPERTIES GENERATED TRUE) -@@ -1106,8 +1106,7 @@ +@@ -1213,8 +1213,7 @@ COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path} @@ -42,9 +44,8 @@ diff -ur a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake DEPENDS msgfmt ${_file_from}) -diff -ur a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt ---- a/source/blender/makesdna/intern/CMakeLists.txt 2025-07-08 08:59:47.000000000 -0400 -+++ b/source/blender/makesdna/intern/CMakeLists.txt 2025-11-17 16:17:13.523438205 -0500 +--- a/source/blender/makesdna/intern/CMakeLists.txt ++++ b/source/blender/makesdna/intern/CMakeLists.txt @@ -105,8 +105,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/dna_type_offsets.h ${CMAKE_CURRENT_BINARY_DIR}/dna_verify.cc @@ -56,15 +57,14 @@ diff -ur a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesd ${CMAKE_CURRENT_BINARY_DIR}/dna_type_offsets.h ${CMAKE_CURRENT_BINARY_DIR}/dna_verify.cc -diff -ur a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt ---- a/source/blender/makesrna/intern/CMakeLists.txt 2025-07-08 08:59:47.000000000 -0400 -+++ b/source/blender/makesrna/intern/CMakeLists.txt 2025-11-17 16:16:37.015304420 -0500 -@@ -460,8 +460,7 @@ +--- a/source/blender/makesrna/intern/CMakeLists.txt ++++ b/source/blender/makesrna/intern/CMakeLists.txt +@@ -422,8 +422,7 @@ add_custom_command( OUTPUT ${GENSRC} COMMAND - ${CMAKE_COMMAND} -E env ${PLATFORM_ENV_BUILD} -- "$" ${CMAKE_CURRENT_BINARY_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/../ -+ makesrna ${CMAKE_CURRENT_BINARY_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/../ +- "$" ${CMAKE_SOURCE_DIR}/source/blender/makesdna/ ${CMAKE_CURRENT_BINARY_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/../ ++ makesrna ${CMAKE_SOURCE_DIR}/source/blender/makesdna/ ${CMAKE_CURRENT_BINARY_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/../ DEPENDS makesrna ) diff --git a/srcpkgs/blender/patches/ffmpeg9.patch b/srcpkgs/blender/patches/ffmpeg9.patch new file mode 100644 index 00000000000000..08b0f082e8a30e --- /dev/null +++ b/srcpkgs/blender/patches/ffmpeg9.patch @@ -0,0 +1,75 @@ +diff --git a/extern/audaspace/plugins/ffmpeg/FFMPEGWriter.cpp b/extern/audaspace/plugins/ffmpeg/FFMPEGWriter.cpp +index 10a80bc6f9bd..74e6c3339892 100644 +--- a/extern/audaspace/plugins/ffmpeg/FFMPEGWriter.cpp ++++ b/extern/audaspace/plugins/ffmpeg/FFMPEGWriter.cpp +@@ -332,12 +332,14 @@ FFMPEGWriter::FFMPEGWriter(const std::string &filename, DeviceSpecs specs, Conta + + bool format_supported = false; + +- for(int i = 0; codec->sample_fmts[i] != -1; i++) ++ const AVSampleFormat *codec_sample_fmts = nullptr; ++ avcodec_get_supported_config(nullptr, codec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0, (const void**)&codec_sample_fmts, nullptr); ++ for(int i = 0; codec_sample_fmts[i] != -1; i++) + { +- if(av_get_alt_sample_fmt(codec->sample_fmts[i], false) == m_codecCtx->sample_fmt) ++ if(av_get_alt_sample_fmt(codec_sample_fmts[i], false) == m_codecCtx->sample_fmt) + { +- m_deinterleave = av_sample_fmt_is_planar(codec->sample_fmts[i]); +- m_codecCtx->sample_fmt = codec->sample_fmts[i]; ++ m_deinterleave = av_sample_fmt_is_planar(codec_sample_fmts[i]); ++ m_codecCtx->sample_fmt = codec_sample_fmts[i]; + format_supported = true; + } + } +@@ -345,10 +347,10 @@ FFMPEGWriter::FFMPEGWriter(const std::string &filename, DeviceSpecs specs, Conta + if(!format_supported) + { + int chosen_index = 0; +- auto chosen = av_get_alt_sample_fmt(codec->sample_fmts[chosen_index], false); +- for(int i = 1; codec->sample_fmts[i] != -1; i++) ++ auto chosen = av_get_alt_sample_fmt(codec_sample_fmts[chosen_index], false); ++ for(int i = 1; codec_sample_fmts[i] != -1; i++) + { +- auto fmt = av_get_alt_sample_fmt(codec->sample_fmts[i], false); ++ auto fmt = av_get_alt_sample_fmt(codec_sample_fmts[i], false); + if((fmt > chosen && chosen < m_codecCtx->sample_fmt) || (fmt > m_codecCtx->sample_fmt && fmt < chosen)) + { + chosen = fmt; +@@ -356,7 +358,7 @@ FFMPEGWriter::FFMPEGWriter(const std::string &filename, DeviceSpecs specs, Conta + } + } + +- m_codecCtx->sample_fmt = codec->sample_fmts[chosen_index]; ++ m_codecCtx->sample_fmt = codec_sample_fmts[chosen_index]; + m_deinterleave = av_sample_fmt_is_planar(m_codecCtx->sample_fmt); + switch(av_get_alt_sample_fmt(m_codecCtx->sample_fmt, false)) + { +@@ -387,19 +389,21 @@ FFMPEGWriter::FFMPEGWriter(const std::string &filename, DeviceSpecs specs, Conta + + m_codecCtx->sample_rate = 0; + +- if(codec->supported_samplerates) ++ const int *codec_supported_samplerates = nullptr; ++ avcodec_get_supported_config(nullptr, codec, AV_CODEC_CONFIG_FRAME_RATE, 0, (const void **)&codec_supported_samplerates, nullptr); ++ if(codec_supported_samplerates) + { +- for(int i = 0; codec->supported_samplerates[i]; i++) ++ for(int i = 0; codec_supported_samplerates[i]; i++) + { +- if(codec->supported_samplerates[i] == m_specs.rate) ++ if(codec_supported_samplerates[i] == m_specs.rate) + { +- m_codecCtx->sample_rate = codec->supported_samplerates[i]; ++ m_codecCtx->sample_rate = codec_supported_samplerates[i]; + break; + } +- else if((codec->supported_samplerates[i] > m_codecCtx->sample_rate && m_specs.rate > m_codecCtx->sample_rate) || +- (codec->supported_samplerates[i] < m_codecCtx->sample_rate && m_specs.rate < codec->supported_samplerates[i])) ++ else if((codec_supported_samplerates[i] > m_codecCtx->sample_rate && m_specs.rate > m_codecCtx->sample_rate) || ++ (codec_supported_samplerates[i] < m_codecCtx->sample_rate && m_specs.rate < codec_supported_samplerates[i])) + { +- m_codecCtx->sample_rate = codec->supported_samplerates[i]; ++ m_codecCtx->sample_rate = codec_supported_samplerates[i]; + } + } + } diff --git a/srcpkgs/blender/template b/srcpkgs/blender/template index 4fcebe34d61dea..fc938147aca8f7 100644 --- a/srcpkgs/blender/template +++ b/srcpkgs/blender/template @@ -1,7 +1,7 @@ # Template file for 'blender' pkgname=blender -version=5.0.0 -revision=2 +version=5.2.2 +revision=1 archs="x86_64* aarch64* ppc64*" build_style=cmake build_helper="qemu numpy" @@ -15,25 +15,26 @@ configure_args="-DWITH_INSTALL_PORTABLE=OFF -DWITH_PYTHON_INSTALL=OFF -DWITH_BUILDINFO=OFF -DPYTHON_VERSION=${py3_ver} -DPYTHON_LIBPATH=${XBPS_CROSS_BASE}/usr/lib -DPYTHON_LIBRARY=python${py3_ver}${py3_abiver} -DPYTHON_INCLUDE_DIRS=${XBPS_CROSS_BASE}/${py3_inc} -DWITH_SYSTEM_LZO=ON -DWITH_SYSTEM_EIGEN3=ON -DWITH_SYSTEM_FREETYPE=ON - -DWITH_DRACO=OFF" + -DWITH_DRACO=OFF -DWITH_SYSTEM_GLOG=ON" hostmakedepends="pkg-config python3 wayland-devel" makedepends="libgomp-devel libpng-devel tiff-devel python3-devel glu-devel glew-devel freetype-devel jack-devel libopenal-devel libsndfile-devel - libsamplerate-devel ffmpeg8-devel fftw-devel boost-headers pcre-devel llvm + libsamplerate-devel ffmpeg-devel fftw-devel boost-headers pcre-devel llvm libopenexr-devel libopenjpeg2-devel libXi-devel openimageio-devel opencolorio-devel opencollada-devel python3-numpy libXrender-devel OpenSubdiv-devel tbb-devel libxml2-devel openvdb-devel alembic-devel pugixml-devel libXxf86vm-devel libepoxy-devel gmp-devel gmpxx-devel wayland-protocols wayland-devel libxkbcommon-devel libdecor-devel libspnav-devel libwebp-devel potrace-devel Haru-devel openxr-devel - pipewire-devel pulseaudio-devel eigen lzo-devel vulkan-loader-devel shaderc" -depends="desktop-file-utils hicolor-icon-theme" + pipewire-devel pulseaudio-devel eigen lzo-devel vulkan-loader-devel shaderc + fmt-devel ceres-solver-devel glog-devel" +depends="desktop-file-utils hicolor-icon-theme python3-cattrs python3-typing_extensions" short_desc="3D graphics creation suite" maintainer="Enno Boland " license="GPL-3.0-or-later" homepage="https://www.blender.org" distfiles="https://download.blender.org/source/blender-${version}.tar.xz" -checksum=120b45227b1dba2ecec116c6f924f3e7efabebac762e030552fdf70baff1b5b4 +checksum=56a3b1ec97479ff24dce65d2f09f8a1895005cece279b701fe4fcf74bce3f77e python_version=3 LDFLAGS="-Wl,-z,stack-size=2097152" # Blender tests are executed against a system installation of blender. This @@ -53,18 +54,13 @@ case "$XBPS_TARGET_MACHINE" in x86_64*) # Blender is heavy itself, # it's insane to use it on machine without x86_64-v2, - # which is what blender itself default to. - build_options="simd" - build_options_default="simd" - # Enable Intel Open Image Denoise on x86_64 + # which is what blender itself defaults to. makedepends+=" openimagedenoise-devel openpgl-devel" configure_args+=" -DWITH_OPENIMAGEDENOISE=ON" ;; +aarch64*) + makedepends+=" sse2neon" + makedepends+=" openimagedenoise-devel openpgl-devel" + configure_args+=" -DWITH_OPENIMAGEDENOISE=ON -DWITH_CYCLES_HIP_BINARIES=OFF" + ;; esac - -post_patch() { - if [ ! "$build_option_simd" ]; then - msg_normal "Dropping -march=x86-64-v2\n" - patch -Np1 -i ${FILESDIR}/x86-64-v2.patch - fi -}