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

Unified · Split

3 files
  1. avplay.c +3 −3
  2. libavcodec/pthread.c +2 −1
  3. libavdevice/dv1394.h +2 −1
avplay.c+3−3
@@ -2608,13 +2608,13 @@ static void stream_cycle_channel(VideoState *is, int codec_type) · 2607 unmodified lines
2608 2608
2609static void toggle_full_screen(void)2609static void toggle_full_screen(void)
2610{2610{
2611 is_full_screen = !is_full_screen;
2612#if defined(__APPLE__) && SDL_VERSION_ATLEAST(1, 2, 14)2611#if defined(__APPLE__) && SDL_VERSION_ATLEAST(1, 2, 14)
2613 /* OS X needs to empty the picture_queue */2612 /* OS X needs to empty the picture_queue */
2614 for (int i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++) {2613 int i;
2614 for (i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++)
2615 cur_stream->pictq[i].reallocate = 1;2615 cur_stream->pictq[i].reallocate = 1;
2616 }
2617#endif2616#endif
2617 is_full_screen = !is_full_screen;
2618 video_open(cur_stream);2618 video_open(cur_stream);
2619}2619}
2620 2620
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;
libavdevice/dv1394.h+2−1
@@ -175,7 +175,8 @@ · 174 unmodified lines
175 if(status.dropped_frames > 0) {175 if(status.dropped_frames > 0) {
176 reset_dv1394();176 reset_dv1394();
177 } else {177 } else {
178 for(int i = 0; i < status.n_clear_frames; i++) {178 int i;
179 for (i = 0; i < status.n_clear_frames; i++) {
179 copy_DV_frame();180 copy_DV_frame();
180 }181 }
181 }182 }

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