diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 0ef4588a042f492bf39bebb7efa794a9c88b4260..9855b3587b12e718d89dd088543f5015d8465589 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -1046,12 +1046,12 @@ int ff_thread_init(AVCodecContext *avctx)
     w32thread_init();
 #endif
 
-        validate_thread_parameters(avctx);
+    validate_thread_parameters(avctx);
 
-        if (avctx->active_thread_type&FF_THREAD_SLICE)
-            return thread_init(avctx);
-        else if (avctx->active_thread_type&FF_THREAD_FRAME)
-            return frame_thread_init(avctx);
+    if (avctx->active_thread_type&FF_THREAD_SLICE)
+        return thread_init(avctx);
+    else if (avctx->active_thread_type&FF_THREAD_FRAME)
+        return frame_thread_init(avctx);
 
     return 0;
 }