[vlc-commits] AVcodec: limit the number of auto-detected threads to 4 by default
Jean-Baptiste Kempf
git at videolan.org
Thu Feb 23 18:10:59 CET 2012
vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Feb 23 17:59:49 2012 +0100| [58f42e28c5b23adf08863ec14f74d43783ee8768] | committer: Jean-Baptiste Kempf
AVcodec: limit the number of auto-detected threads to 4 by default
Revert this when you have found the reason why it fails for soo many
people, in avi, mp4 (and mkv before the HACK)
(cherry picked from commit ce85748bd0dcc074d69c71d51ead53968eebeb9e)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=58f42e28c5b23adf08863ec14f74d43783ee8768
---
modules/codec/avcodec/video.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 49f94fc..b309b76 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -341,6 +341,9 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
i_thread_count = vlc_GetCPUCount();
if( i_thread_count > 1 )
i_thread_count++;
+
+ //FIXME: take in count the decoding time
+ i_thread_count = __MIN( i_thread_count, 4 );
}
i_thread_count = __MIN( i_thread_count, 16 );
msg_Dbg( p_dec, "allowing %d thread(s) for decoding", i_thread_count );
More information about the vlc-commits
mailing list