commit 8d86c442a4d752f1b0a7fdb70f447005d8853bf1
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Tue Apr 30 16:05:58 2024 +0100
Update to 2.4.0
ffmpeg6.patch | 55 ++++++++++++------------------------------------
fix_xvid_detection.patch | 13 ++++++++++++
gpac-noopt.patch | 11 +++++-----
gpac.spec | 20 +++++++-----------
sources | 2 +-
5 files changed, 40 insertions(+), 61 deletions(-)
---
diff --git a/ffmpeg6.patch b/ffmpeg6.patch
index 0e7c182..b4874ed 100644
--- a/ffmpeg6.patch
+++ b/ffmpeg6.patch
@@ -1,51 +1,22 @@
-From ba14e34dd7a3c4cef5a56962898e9f863dd4b4f3 Mon Sep 17 00:00:00 2001
+From 8d7cac0bf9f9775cae1d43de7138206758f28b0c Mon Sep 17 00:00:00 2001
From: jeanlf <jeanlf(a)gpac.io>
-Date: Mon, 13 Mar 2023 09:43:52 +0100
-Subject: [PATCH] fixed compil with ffmpeg 6 - cf #2406
+Date: Thu, 25 Apr 2024 16:10:14 +0200
+Subject: [PATCH] Fixed #2810
---
- src/filters/ff_mx.c | 20 ++++++++++++++++----
- 1 file changed, 16 insertions(+), 4 deletions(-)
+ src/filters/ff_mx.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/filters/ff_mx.c b/src/filters/ff_mx.c
-index 34e5f59e7c..5cf1d98941 100644
+index 6c704dce25..45499b4f5c 100644
--- a/src/filters/ff_mx.c
+++ b/src/filters/ff_mx.c
-@@ -503,7 +503,11 @@ static GF_Err ffmx_close_seg(GF_Filter *filter, GF_FFMuxCtx *ctx,
Bool send_evt_
- evt.seg_size.is_init = 0;
- }
- evt.seg_size.media_range_start = ctx->offset_at_seg_start;
-+#if LIBAVFORMAT_VERSION_MAJOR < 60
- evt.seg_size.media_range_end = ctx->muxer->pb ?
(ctx->muxer->pb->written-1) : 0;
-+#else
-+ evt.seg_size.media_range_end = ctx->muxer->pb ?
(ctx->muxer->pb->bytes_written-1) : 0;
-+#endif
- ctx->offset_at_seg_start = evt.seg_size.media_range_end;
+@@ -247,7 +247,7 @@ static GF_Err ffmx_init_mux(GF_Filter *filter, GF_FFMuxCtx *ctx)
+ }
- gf_filter_pid_send_event(pid, &evt);
-@@ -1013,13 +1017,21 @@ static GF_Err ffmx_configure_pid(GF_Filter *filter, GF_FilterPid
*pid, Bool is_r
- ff_codec_id = ffmpeg_codecid_from_gpac(codec_id, &ff_codec_tag);
- }
-
-+
-+ res = 1;
-+#if LIBAVFORMAT_VERSION_MAJOR < 60
- if (ctx->muxer->oformat && ctx->muxer->oformat->query_codec) {
- res = ctx->muxer->oformat->query_codec(ff_codec_id, 1);
-- if (!res) {
-- GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMux] Codec %s not supported in
container %s\n", gf_codecid_name(codec_id), ctx->muxer->oformat->name));
-- return GF_NOT_SUPPORTED;
-- }
- }
-+#else
-+ res = avformat_query_codec(ctx->muxer->oformat, ff_codec_id,
FF_COMPLIANCE_NORMAL);
-+#endif
-+
-+ if (!res) {
-+ GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMux] Codec %s not supported in
container %s\n", gf_codecid_name(codec_id), ctx->muxer->oformat->name));
-+ return GF_NOT_SUPPORTED;
-+ }
-+
- const AVCodec *c = avcodec_find_decoder(ff_codec_id);
- if (!c) return GF_NOT_SUPPORTED;
+-#if (LIBAVFORMAT_VERSION_MAJOR <= 59)
++#if (LIBAVFORMAT_VERSION_MAJOR < 61)
+ static int ffavio_write_packet(void *opaque, uint8_t *buf, int buf_size)
+ #else
+ static int ffavio_write_packet(void *opaque, const uint8_t *buf, int buf_size)
diff --git a/fix_xvid_detection.patch b/fix_xvid_detection.patch
new file mode 100644
index 0000000..8e1c98d
--- /dev/null
+++ b/fix_xvid_detection.patch
@@ -0,0 +1,13 @@
+--- a/configure 2024-04-17 18:18:21.000000000 +0100
++++ b/configure 2024-04-30 15:47:55.511913634 +0100
+@@ -1632,8 +1632,8 @@ int main( void ) { a52_state_t *codec; a
+
+
+
+-config_package xvid "xvid" "" "-lxvidcore
$PTHREAD_LDFLAGS" "" '#include <xvid.h>
+-int main( void ) { void *codec; xvid_decore(codec, XVID_DEC_DESTROY, NULL, NULL); return
0; }'
++config_package xvid "xvid" "" "-lxvidcore -lpthread"
"" '#include <xvid.h>
++int main( void ) { return 0; }'
+
+ config_package faad "faad2" "" "-lfaad -lm" ""
'#include <faad.h>
+ int main( void ) { NeAACDecOpen(); return 0; }'
diff --git a/gpac-noopt.patch b/gpac-noopt.patch
index 2d47d03..814e5f9 100644
--- a/gpac-noopt.patch
+++ b/gpac-noopt.patch
@@ -1,12 +1,11 @@
-diff -up gpac-2.2.1/configure.orig gpac-2.2.1/configure
---- gpac-2.2.1/configure.orig 2023-04-24 14:57:53.000000000 +0200
-+++ gpac-2.2.1/configure 2024-03-18 22:28:23.019132462 +0100
-@@ -945,7 +945,7 @@ fi
+--- a/configure 2024-04-17 18:18:21.000000000 +0100
++++ b/configure 2024-04-28 12:43:47.327538032 +0100
+@@ -1135,7 +1135,7 @@ fi
#GCC opt
if test "$no_gcc_opt" = "no"; then
- CFLAGS="-O3 $CFLAGS"
+ CFLAGS="$CFLAGS"
else
- CFLAGS="-O0 $CFLAGS"
- fi
+
+ #on emscripten+asan, failure to load wasm when build with -00, use -01
diff --git a/gpac.spec b/gpac.spec
index 303f657..2562105 100644
--- a/gpac.spec
+++ b/gpac.spec
@@ -16,23 +16,16 @@
Name: gpac
Summary: MPEG-4 multimedia framework
-Version: 2.2.1
-Release: 6%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist}
+Version: 2.4.0
+Release: 1%{?dist}
License: LGPLv2+
URL:
https://gpac.sourceforge.net/
Source0:
https://github.com/gpac/gpac/archive/v%{version}/gpac-%{version}.tar.gz
#Source0:
https://github.com/gpac/gpac/archive/%{commit}/gpac-%{commit}.tar.gz
-Patch0: gpac-doxygen_195.patch
-Patch1:
https://github.com/gpac/gpac/commit/ba14e34dd7a3c4cef5a56962898e9f863dd4b...
-# zlib-ng doesn't define the zmemcpy macro anymore
-#
https://github.com/gpac/gpac/pull/2780
-Patch2: gpac-no-zmemcpy.patch
-# cuvid device pointers are 64bit on aarch64 as well
-#
https://github.com/gpac/gpac/pull/2781
-Patch3: gpac-aarch64-nvdec.patch
-# drop -O3 from CFLAGS
-Patch4: gpac-noopt.patch
+Patch0: gpac-noopt.patch
+Patch1:
https://github.com/gpac/gpac/commit/8d7cac0bf9f9775cae1d43de7138206758f28...
+Patch2: fix_xvid_detection.patch
BuildRequires: SDL2-devel
BuildRequires: a52dec-devel
@@ -202,6 +195,9 @@ rm %{buildroot}%{_includedir}/gpac/00_doxy.h
%changelog
+* Sun Apr 28 2024 Leigh Scott <leigh123linux(a)gmail.com> - 2.4.0-1
+- Update to 2.4.0
+
* Tue Mar 12 2024 Dominik Mierzejewski <dominik(a)greysector.net> - 2.2.1-6
- re-enable zlib and nvdec
- fix build with zlib-ng
diff --git a/sources b/sources
index ec90906..567856e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (gpac-2.2.1.tar.gz) =
873df4c2fdc3594a0f3bce66d511cee14669643042ab1ca8d7f370ad3f50636c32c31f79818051d00bf844de30a5533ae30c81ed168baf2626a152771b6a6845
+SHA512 (gpac-2.4.0.tar.gz) =
164d8a1ff235413852cc2077b5153c36b094862b61fdda12065bf6810926caabd1a1f6f30b7aac9a5b640f51fe92a6ca911518a424cab7220b635920d95da99f