OSDN Git Service

Fix build with threading disabled
authorMans Rullgard <mans@mansr.com>
Wed, 9 Feb 2011 20:15:25 +0000 (20:15 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 11 Feb 2011 01:54:08 +0000 (02:54 +0100)
The avcodec_thread_free() compatibility wrapper calls ff_thread_free(),
which is not defined when threading is disabled.  Make this call
conditional.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 9a77a92c2b6855781d2a4cfab14c67ae4025760c)

libavcodec/utils.c

index 404bf47..8e5cfd5 100644 (file)
@@ -1339,7 +1339,9 @@ int avcodec_thread_init(AVCodecContext *s, int thread_count)
 
 void avcodec_thread_free(AVCodecContext *s)
 {
+#if HAVE_THREADS
     return ff_thread_free(s);
+#endif
 }
 
 #endif