]> git.sesse.net Git - ffmpeg/commitdiff
pthread: Fix mixing of declarations and statements.
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 17 Mar 2012 22:49:56 +0000 (23:49 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 17 Mar 2012 22:49:56 +0000 (23:49 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/pthread.c

index d02f6844b403e62236e43a0c47164a73a7e5b206..7834922f9f4911330b503a29504ae45eefcae5c4 100644 (file)
@@ -895,6 +895,7 @@ error:
 void ff_thread_flush(AVCodecContext *avctx)
 {
     FrameThreadContext *fctx = avctx->thread_opaque;
+    int i;
 
     if (!avctx->thread_opaque) return;
 
@@ -910,7 +911,7 @@ void ff_thread_flush(AVCodecContext *avctx)
     fctx->delaying = 1;
     fctx->prev_thread = NULL;
     // Make sure decode flush calls with size=0 won't return old frames
-    for (int i = 0; i < avctx->thread_count; i++)
+    for (i = 0; i < avctx->thread_count; i++)
         fctx->threads[i].got_frame = 0;
 }