From: Brendan McGrath bmcgrath@codeweavers.com
The avdec_h264 element can use 32MB per thread when working with 4K video.
With 16 threads, this is 512MB, which is a quarter of the RAM available to a 32-bit application. Setting 'max_threads' to 4 can save 384MB. --- dlls/winegstreamer/unixlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winegstreamer/unixlib.c b/dlls/winegstreamer/unixlib.c index f085693cae6..609c326152c 100644 --- a/dlls/winegstreamer/unixlib.c +++ b/dlls/winegstreamer/unixlib.c @@ -331,7 +331,7 @@ void set_max_threads(GstElement *element)
if (shortname && strstr(shortname, "avdec_") && element_has_property(element, "max-threads")) { - gint32 max_threads = MIN(thread_count, 16); + gint32 max_threads = MIN(thread_count, sizeof(void *) == 4 ? 4 : 16); GST_DEBUG("%s found, setting max-threads to %d.", shortname, max_threads); g_object_set(element, "max-threads", max_threads, NULL); }