OSDN Git Service

Fix build with threading disabled
authorMans Rullgard <mans@mansr.com>
Wed, 9 Feb 2011 20:15:25 +0000 (20:15 +0000)
committerMans Rullgard <mans@mansr.com>
Wed, 9 Feb 2011 20:52:28 +0000 (20:52 +0000)
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>
libavcodec/utils.c

index 0816b39..03018b8 100644 (file)
@@ -1297,7 +1297,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