summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-06-14 10:19:06 +0200
committerDiego Biurrun <diego@biurrun.de>2012-06-14 23:36:04 +0200
commitd246c18ea6dca4dbdc92aec6ae4e3e038999a709 (patch)
tree021d829907a0dac6bdc37bfa0779bedf71f4e75b /libavcodec
parent7dc747f50b0adeaf2bcf6413e291dc4bffa54f9a (diff)
Avoid C99 variable declarations within for statements.
We generally do not declare variables within for statements and there are compilers that choke on such constructs.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/pthread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 88d8ade57e..c7edb9ec81 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -865,6 +865,7 @@ error:
void ff_thread_flush(AVCodecContext *avctx)
{
+ int i;
FrameThreadContext *fctx = avctx->thread_opaque;
if (!avctx->thread_opaque) return;
@@ -880,7 +881,7 @@ void ff_thread_flush(AVCodecContext *avctx)
fctx->next_decoding = fctx->next_finished = 0;
fctx->delaying = 1;
fctx->prev_thread = NULL;
- for (int i = 0; i < avctx->thread_count; i++) {
+ for (i = 0; i < avctx->thread_count; i++) {
PerThreadContext *p = &fctx->threads[i];
// Make sure decode flush calls with size=0 won't return old frames
p->got_frame = 0;