We generally do not declare variables within for statements and there are compilers that choke on such constructs.
Unified · Split
| @@ -2608,13 +2608,13 @@ static void stream_cycle_channel(VideoState *is, int codec_type) · 2607 unmodified lines | |||
| 2608 | 2608 | ||
| 2609 | static void toggle_full_screen(void) | 2609 | static 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 | #endif | 2616 | #endif |
| 2617 | is_full_screen = !is_full_screen; | ||
| 2618 | video_open(cur_stream); | 2618 | video_open(cur_stream); |
| 2619 | } | 2619 | } |
| 2620 | 2620 | ||
| @@ -865,6 +865,7 @@ error: · 864 unmodified lines | |||
| 865 | 865 | ||
| 866 | void ff_thread_flush(AVCodecContext *avctx) | 866 | void 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 frames | 886 | // Make sure decode flush calls with size=0 won't return old frames |
| 886 | p->got_frame = 0; | 887 | p->got_frame = 0; |
| @@ -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 | } |