[vlc-commits] avcodec: limit the amount of threads to 6 for UWP apps
Steve Lhomme
git at videolan.org
Tue Feb 20 10:03:30 CET 2018
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Feb 19 14:47:48 2018 +0100| [4b5811c13665819ae6f9d01479fe32cc6894cbed] | committer: Hugo Beauzée-Luyssen
avcodec: limit the amount of threads to 6 for UWP apps
This will also limit the amount of memory used
(cherry picked from commit a2624b4fd8b44c153bcc1163ade462e1989927d7)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=4b5811c13665819ae6f9d01479fe32cc6894cbed
---
modules/codec/avcodec/video.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index abb6bdd203..9df2c413f8 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -542,7 +542,11 @@ int InitVideoDec( vlc_object_t *obj )
i_thread_count++;
//FIXME: take in count the decoding time
+#if VLC_WINSTORE_APP
+ i_thread_count = __MIN( i_thread_count, 6 );
+#else
i_thread_count = __MIN( i_thread_count, p_codec->id == AV_CODEC_ID_HEVC ? 10 : 6 );
+#endif
}
i_thread_count = __MIN( i_thread_count, p_codec->id == AV_CODEC_ID_HEVC ? 32 : 16 );
msg_Dbg( p_dec, "allowing %d thread(s) for decoding", i_thread_count );
More information about the vlc-commits
mailing list