]> git.sesse.net Git - vlc/commitdiff
Avcodec: disable multi-threading for MPEG-4 Video
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 18 Jun 2013 09:10:26 +0000 (11:10 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 18 Jun 2013 09:10:26 +0000 (11:10 +0200)
This seems buggy in libavcodec

Close #8486

modules/codec/avcodec/video.c

index 72e1b3b0d943c65a1effb5305e03fc2d078af5b0..4738e524824995a3118841c7868e8f3a98f3134f 100644 (file)
@@ -331,6 +331,10 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
     i_thread_count = __MIN( i_thread_count, 16 );
     msg_Dbg( p_dec, "allowing %d thread(s) for decoding", i_thread_count );
     p_sys->p_context->thread_count = i_thread_count;
+
+    if( i_codec_id == AV_CODEC_ID_MPEG4 )
+        p_sys->p_context->thread_count = 1;
+
 #endif
 
     char *hw = var_CreateGetString( p_dec, "avcodec-hw" ); /* FIXME */