[vlc-devel] [PATCH 3/4] avcodec: force single-threaded decoding for WebP

Tristan Matthews tmatth at videolan.org
Tue Mar 6 07:40:57 CET 2018


Anything higher fails to decode currently.

Refs #19446
---
 modules/codec/avcodec/video.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 174a252388..6894580f9e 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -562,7 +562,9 @@ int InitVideoDec( vlc_object_t *obj )
         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 );
+    i_thread_count = __MIN( i_thread_count, p_codec->id == AV_CODEC_ID_HEVC ? 32 :
+                                            p_codec->id == AV_CODEC_ID_WEBP ? 1 :
+                                            16 );
     msg_Dbg( p_dec, "allowing %d thread(s) for decoding", i_thread_count );
     p_context->thread_count = i_thread_count;
     p_context->thread_safe_callbacks = true;
-- 
2.16.2



More information about the vlc-devel mailing list