diff w32thread.c @ 10954:d7ef6611a49e libavcodec

Always call avcodec_thread_init() The various avcodec_thread_init() functions are updated to return immediately after setting avctx->thread_count. This allows -threads 0 to pass through to codecs. It also simplifies the usage for apps using libavcodec.
author mru
date Wed, 20 Jan 2010 22:55:50 +0000
parents e68792a12c31
children fe7a77f77927
line wrap: on
line diff
--- a/w32thread.c	Wed Jan 20 19:23:19 2010 +0000
+++ b/w32thread.c	Wed Jan 20 22:55:50 2010 +0000
@@ -131,6 +131,9 @@
 
     s->thread_count= thread_count;
 
+    if (thread_count <= 1)
+        return 0;
+
     assert(!s->thread_opaque);
     c= av_mallocz(sizeof(ThreadContext)*thread_count);
     s->thread_opaque= c;