diff mbox series

[FFmpeg-devel,08/13] avcodec/frame_thread_encoder: Reindent after the previous commit

Message ID AM7PR03MB6660FA611F210EDE83C4488C8FCE9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 2e574235b02ab33db67a12f0288b90ccbf256617
Headers show
Series [FFmpeg-devel,01/13] avcodec/vp9: Do not destroy uninitialized mutexes/conditions | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 fail Make fate failed
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 2, 2021, 3:41 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/frame_thread_encoder.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/frame_thread_encoder.c b/libavcodec/frame_thread_encoder.c
index e5f6544750..8f8294374f 100644
--- a/libavcodec/frame_thread_encoder.c
+++ b/libavcodec/frame_thread_encoder.c
@@ -250,21 +250,19 @@  fail:
 }
 
 void ff_frame_thread_encoder_free(AVCodecContext *avctx){
-    int i;
     ThreadContext *c= avctx->internal->frame_thread_encoder;
 
     /* In case initializing the mutexes/condition variables failed,
      * they must not be used. In this case the thread_count is zero
      * as no thread has been initialized yet. */
     if (avctx->thread_count > 0) {
-    pthread_mutex_lock(&c->task_fifo_mutex);
-    atomic_store(&c->exit, 1);
-    pthread_cond_broadcast(&c->task_fifo_cond);
-    pthread_mutex_unlock(&c->task_fifo_mutex);
+        pthread_mutex_lock(&c->task_fifo_mutex);
+        atomic_store(&c->exit, 1);
+        pthread_cond_broadcast(&c->task_fifo_cond);
+        pthread_mutex_unlock(&c->task_fifo_mutex);
 
-    for (i=0; i<avctx->thread_count; i++) {
-         pthread_join(c->worker[i], NULL);
-    }
+        for (int i = 0; i < avctx->thread_count; i++)
+            pthread_join(c->worker[i], NULL);
     }
 
     for (unsigned i = 0; i < c->max_tasks; i++) {