[vlc-commits] avcodec: limit the amount of threads to 6 for UWP apps

Steve Lhomme git at videolan.org
Mon Feb 19 18:11:02 CET 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Feb 19 14:47:48 2018 +0100| [a2624b4fd8b44c153bcc1163ade462e1989927d7] | committer: Steve Lhomme

avcodec: limit the amount of threads to 6 for UWP apps

This will also limit the amount of memory used

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a2624b4fd8b44c153bcc1163ade462e1989927d7
---

 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 a23b38ce90..174a252388 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -556,7 +556,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