public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gpac] epel9: backport fix for building with FFmpeg 7.1 (rhbz#2344722)
@ 2026-09-22 15:09 Dominik 'Rathann' Mierzejewski
  0 siblings, 0 replies; only message in thread
From: Dominik 'Rathann' Mierzejewski @ 2026-09-22 15:09 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/gpac
Branch : epel9
Commit : d79ed9f9a01d27dacfb2959316b9e9da5234b02e
Author : Dominik 'Rathann' Mierzejewski <dominik@greysector.net>
Date   : 2025-02-10T22:16:12+01:00
Stats  : +91/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/gpac/c/d79ed9f9a01d27dacfb2959316b9e9da5234b02e?branch=epel9

Log:
backport fix for building with FFmpeg 7.1 (rhbz#2344722)

---
diff --git a/gpac-ffmpeg7.1.patch b/gpac-ffmpeg7.1.patch
new file mode 100644
index 0000000..f3838f0
--- /dev/null
+++ b/gpac-ffmpeg7.1.patch
@@ -0,0 +1,86 @@
+From 18863aa2176e423dae2a6d7e39ff6ed6a37b2b78 Mon Sep 17 00:00:00 2001
+From: Deniz Ugur <7467169+DenizUgur@users.noreply.github.com>
+Date: Tue, 8 Oct 2024 21:41:05 -0400
+Subject: [PATCH] fix: private fields were removed in libavformat >= 61
+
+---
+ src/filters/ff_dmx.c | 41 ++++++++++++++---------------------------
+ 1 file changed, 14 insertions(+), 27 deletions(-)
+
+diff --git a/src/filters/ff_dmx.c b/src/filters/ff_dmx.c
+index 540eb80fc1..a612bee571 100644
+--- a/src/filters/ff_dmx.c
++++ b/src/filters/ff_dmx.c
+@@ -2204,7 +2204,6 @@ char *dev_desc = NULL;
+ static void ffavin_enum_devices(const char *dev_name, Bool is_audio)
+ {
+ 	const AVInputFormat *fmt;
+-	AVFormatContext *ctx;
+ 
+     if (!dev_name) return;
+     fmt = av_find_input_format(dev_name);
+@@ -2213,42 +2212,31 @@ static void ffavin_enum_devices(const char *dev_name, Bool is_audio)
+     if (!fmt || !fmt->priv_class || !AV_IS_INPUT_DEVICE(fmt->priv_class->category)) {
+ 		return;
+ 	}
+-    ctx = avformat_alloc_context();
+-    if (!ctx) return;
+-    ctx->iformat = (AVInputFormat *)fmt;
+-    if (ctx->iformat->priv_data_size > 0) {
+-        ctx->priv_data = av_mallocz(ctx->iformat->priv_data_size);
+-        if (!ctx->priv_data) {
+-			avformat_free_context(ctx);
+-            return;
+-        }
+-        if (ctx->iformat->priv_class) {
+-            *(const AVClass**)ctx->priv_data = ctx->iformat->priv_class;
+-            av_opt_set_defaults(ctx->priv_data);
+-        }
+-    } else {
+-        ctx->priv_data = NULL;
+-	}
+ 
+ 	AVDeviceInfoList *dev_list = NULL;
+-
+-    AVDictionary *tmp = NULL;
+-	av_dict_set(&tmp, "list_devices", "1", 0);
+-    av_opt_set_dict2(ctx, &tmp, AV_OPT_SEARCH_CHILDREN);
+-	if (tmp)
+-		av_dict_free(&tmp);
+-
+-	int res = avdevice_list_devices(ctx, &dev_list);
++	int res = avdevice_list_input_sources(fmt, dev_name, NULL, &dev_list);
+ 	if (res<0) {
+ 		//device doesn't implement avdevice_list_devices, try loading the context using "list_devices=1" option
+ 		if (-res == ENOSYS) {
++			AVFormatContext *ctx = avformat_alloc_context();
++			if (!ctx) return;
++
+ 			AVDictionary *opts = NULL;
+ 			av_dict_set(&opts, "list_devices", "1", 0);
+ 			res = avformat_open_input(&ctx, "dummy", FF_IFMT_CAST fmt, &opts);
+ 			if (opts)
+ 				av_dict_free(&opts);
++
++#if !defined(__DARWIN__) && !defined(__APPLE__)
++			// FIXME: no-op, permission issues on macOS Sonoma+
++			if (res>=0) avdevice_list_devices(ctx, &dev_list);
++#endif
++
++			if (res>=0) avformat_close_input(&ctx);
++			avformat_free_context(ctx);
+ 		}
+-	} else if (!res && dev_list->nb_devices) {
++	}
++	if (!res && dev_list && dev_list->nb_devices) {
+ 		if (!dev_desc) {
+ 			gf_dynstrcat(&dev_desc, "# Detected devices\n", NULL);
+ 		}
+@@ -2265,7 +2253,6 @@ static void ffavin_enum_devices(const char *dev_name, Bool is_audio)
+ 	}
+ 
+ 	if (dev_list) avdevice_free_list_devices(&dev_list);
+-	avformat_free_context(ctx);
+ }
+ 
+ static void ffavin_log_none(void *avcl, int level, const char *fmt, va_list vl)

diff --git a/gpac.spec b/gpac.spec
index d397268..d5c6257 100644
--- a/gpac.spec
+++ b/gpac.spec
@@ -3,7 +3,7 @@
 Name:        gpac
 Summary:     MPEG-4 multimedia framework
 Version:     2.4.0
-Release:     5%{?dist}
+Release:     6%{?dist}
 License:     LGPL-2.0-or-later
 URL:         https://gpac.io/
 Source0:     https://github.com/gpac/gpac/archive/v%{version}/gpac-%{version}.tar.gz
@@ -13,6 +13,7 @@ Patch0:      gpac-noopt.patch
 Patch1:      https://github.com/gpac/gpac/commit/8d7cac0bf9f9775cae1d43de7138206758f28b0c.patch#/gpac-ffmpeg6.patch
 Patch2:      https://github.com/gpac/gpac/commit/a005fd6eb7a9ede4d3356630cae3d6516c91b73e.patch#/gpac-fix-library-detection.patch
 Patch3:      https://github.com/gpac/gpac/commit/d9d5a145a5e1dc1aef44def91f99d1ee3f358dfa.patch#/gpac-lto-type-mismatch.patch
+Patch4:      https://github.com/gpac/gpac/commit/18863aa2176e423dae2a6d7e39ff6ed6a37b2b78.patch#/gpac-ffmpeg7.1.patch
 
 BuildRequires:  SDL2-devel
 BuildRequires:  a52dec-devel
@@ -178,6 +179,9 @@ rm %{buildroot}%{_includedir}/gpac/00_doxy.h
 
 
 %changelog
+* Mon Feb 10 2025 Dominik Mierzejewski <dominik@greysector.net> - 2.4.0-6
+- backport fix for building with FFmpeg 7.1 (rhbz#2344722)
+
 * Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-22 15:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-22 15:09 [rpms/gpac] epel9: backport fix for building with FFmpeg 7.1 (rhbz#2344722) Dominik 'Rathann' Mierzejewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox