History

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.

Diego Biurrun committed 14 years ago

Commit d246c181 parent 7dc747f3 files · +7 −5Browse files

Showing the changes to libavcodec (1 of 3 files). Show all

Unified · Split

libavcodec/pthread.c+2−1
@@ -865,6 +865,7 @@ error: · 864 unmodified lines
865865
866866 void ff_thread_flush(AVCodecContext *avctx)
867867 {
868+ int i;
868869 FrameThreadContext *fctx = avctx->thread_opaque;
869870
870871 if (!avctx->thread_opaque) return;
@@ -880,7 +881,7 @@ void ff_thread_flush(AVCodecContext *avctx) · 9 unmodified lines
880881 fctx->next_decoding = fctx->next_finished = 0;
881882 fctx->delaying = 1;
882883 fctx->prev_thread = NULL;
883− for (int i = 0; i < avctx->thread_count; i++) {
884+ for (i = 0; i < avctx->thread_count; i++) {
884885 PerThreadContext *p = &fctx->threads[i];
885886 // Make sure decode flush calls with size=0 won't return old frames
886887 p->got_frame = 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t