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
865 865
866void ff_thread_flush(AVCodecContext *avctx)866void ff_thread_flush(AVCodecContext *avctx)
867{867{
868 int i;
868 FrameThreadContext *fctx = avctx->thread_opaque;869 FrameThreadContext *fctx = avctx->thread_opaque;
869 870
870 if (!avctx->thread_opaque) return;871 if (!avctx->thread_opaque) return;
@@ -880,7 +881,7 @@ void ff_thread_flush(AVCodecContext *avctx) · 9 unmodified lines
880 fctx->next_decoding = fctx->next_finished = 0;881 fctx->next_decoding = fctx->next_finished = 0;
881 fctx->delaying = 1;882 fctx->delaying = 1;
882 fctx->prev_thread = NULL;883 fctx->prev_thread = NULL;
883 for (int i = 0; i < avctx->thread_count; i++) {884 for (i = 0; i < avctx->thread_count; i++) {
884 PerThreadContext *p = &fctx->threads[i];885 PerThreadContext *p = &fctx->threads[i];
885 // Make sure decode flush calls with size=0 won't return old frames886 // Make sure decode flush calls with size=0 won't return old frames
886 p->got_frame = 0;887 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