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/wg_parser.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c index dc820df2d24..a058ab08715 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -580,7 +580,11 @@ static void deep_element_added_cb(GstBin *self, GstBin *sub_bin, GstElement *ele
if (name && strstr(name, "libav H.264")) { +#if defined(__i386__) + const gint32 MAX_THREADS = 4; +#else const gint32 MAX_THREADS = 16; +#endif gint32 max_threads;
#ifdef HAVE_SCHED_SETAFFINITY