aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVVD <vvd@unislabs.com>2022-03-18 17:36:44 +0000
committerJan Beich <jbeich@FreeBSD.org>2022-03-18 20:44:49 +0000
commit3b3b0fa358409a78150119c36d8cd236de7f91fc (patch)
treeb371f49e2718d250533c7cf0e35c71fa335f520a
parent8d7f9692bc3a64bdcc473b4f4b3d54a7f73a783f (diff)
downloadports-3b3b0fa358409a78150119c36d8cd236de7f91fc.tar.gz
ports-3b3b0fa358409a78150119c36d8cd236de7f91fc.zip
multimedia/libxine: unbreak DAV1D=on after 3468f1957cf2
dav1d.c:547:12: error: no member named 'n_frame_threads' in 'struct Dav1dSettings' settings.n_frame_threads = (ncpu > 8) ? 4 : (ncpu < 2) ? 1 : ncpu/2; ~~~~~~~~ ^ dav1d.c:548:12: error: no member named 'n_tile_threads' in 'struct Dav1dSettings' settings.n_tile_threads = MAX(1, ncpu - settings.n_frame_threads + 1); ~~~~~~~~ ^ dav1d.c:548:52: error: no member named 'n_frame_threads' in 'struct Dav1dSettings' settings.n_tile_threads = MAX(1, ncpu - settings.n_frame_threads + 1); ~~~~~~~~ ^ dav1d.c:548:52: error: no member named 'n_frame_threads' in 'struct Dav1dSettings' settings.n_tile_threads = MAX(1, ncpu - settings.n_frame_threads + 1); ~~~~~~~~ ^ /usr/include/sys/param.h:306:34: note: expanded from macro 'MAX' #define MAX(a,b) (((a)>(b))?(a):(b)) ^ dav1d.c:551:22: error: no member named 'n_frame_threads' in 'struct Dav1dSettings' settings.n_frame_threads, settings.n_tile_threads); ~~~~~~~~ ^ dav1d.c:551:48: error: no member named 'n_tile_threads' in 'struct Dav1dSettings' settings.n_frame_threads, settings.n_tile_threads); ~~~~~~~~ ^ ../../include/xine/xineutils.h:687:40: note: expanded from macro 'xprintf' xine_log(xine, XINE_LOG_TRACE, __VA_ARGS__); \ ^~~~~~~~~~~ PR: 262651
-rw-r--r--multimedia/libxine/files/patch-dav1d-1.047
1 files changed, 47 insertions, 0 deletions
diff --git a/multimedia/libxine/files/patch-dav1d-1.0 b/multimedia/libxine/files/patch-dav1d-1.0
new file mode 100644
index 000000000000..e18689712281
--- /dev/null
+++ b/multimedia/libxine/files/patch-dav1d-1.0
@@ -0,0 +1,47 @@
+https://sourceforge.net/p/xine/tickets/11/
+
+dav1d.c:547:12: error: no member named 'n_frame_threads' in 'struct Dav1dSettings'
+ settings.n_frame_threads = (ncpu > 8) ? 4 : (ncpu < 2) ? 1 : ncpu/2;
+ ~~~~~~~~ ^
+dav1d.c:548:12: error: no member named 'n_tile_threads' in 'struct Dav1dSettings'
+ settings.n_tile_threads = MAX(1, ncpu - settings.n_frame_threads + 1);
+ ~~~~~~~~ ^
+dav1d.c:548:52: error: no member named 'n_frame_threads' in 'struct Dav1dSettings'
+ settings.n_tile_threads = MAX(1, ncpu - settings.n_frame_threads + 1);
+ ~~~~~~~~ ^
+dav1d.c:548:52: error: no member named 'n_frame_threads' in 'struct Dav1dSettings'
+ settings.n_tile_threads = MAX(1, ncpu - settings.n_frame_threads + 1);
+ ~~~~~~~~ ^
+/usr/include/sys/param.h:306:34: note: expanded from macro 'MAX'
+#define MAX(a,b) (((a)>(b))?(a):(b))
+ ^
+dav1d.c:551:22: error: no member named 'n_frame_threads' in 'struct Dav1dSettings'
+ settings.n_frame_threads, settings.n_tile_threads);
+ ~~~~~~~~ ^
+dav1d.c:551:48: error: no member named 'n_tile_threads' in 'struct Dav1dSettings'
+ settings.n_frame_threads, settings.n_tile_threads);
+ ~~~~~~~~ ^
+../../include/xine/xineutils.h:687:40: note: expanded from macro 'xprintf'
+ xine_log(xine, XINE_LOG_TRACE, __VA_ARGS__); \
+ ^~~~~~~~~~~
+
+--- src/video_dec/dav1d.c.orig 2022-03-06 16:31:24 UTC
++++ src/video_dec/dav1d.c
+@@ -544,11 +544,17 @@ static video_decoder_t *_open_plugin(video_decoder_cla
+
+ /* multithreading */
+ ncpu = xine_cpu_count();
++#if DAV1D_API_VERSION_MAJOR > 5
++ settings.n_threads = ncpu + 1;
++ xprintf(stream->xine, XINE_VERBOSITY_DEBUG, LOG_MODULE ": "
++ "Using %d threads\n", settings.n_threads);
++#else
+ settings.n_frame_threads = (ncpu > 8) ? 4 : (ncpu < 2) ? 1 : ncpu/2;
+ settings.n_tile_threads = MAX(1, ncpu - settings.n_frame_threads + 1);
+ xprintf(stream->xine, XINE_VERBOSITY_DEBUG, LOG_MODULE ": "
+ "Using %d frame threads, %d tile threads\n",
+ settings.n_frame_threads, settings.n_tile_threads);
++#endif
+
+ /* dri frame allocator */
+ settings.allocator.cookie = this;