We generally do not declare variables within for statements and
there are compilers that choke on such constructs.
static void toggle_full_screen(void)
{
static void toggle_full_screen(void)
{
- is_full_screen = !is_full_screen;
#if defined(__APPLE__) && SDL_VERSION_ATLEAST(1, 2, 14)
/* OS X needs to empty the picture_queue */
#if defined(__APPLE__) && SDL_VERSION_ATLEAST(1, 2, 14)
/* OS X needs to empty the picture_queue */
- for (int i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++) {
+ int i;
+ for (i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++)
cur_stream->pictq[i].reallocate = 1;
cur_stream->pictq[i].reallocate = 1;
+ is_full_screen = !is_full_screen;
video_open(cur_stream);
}
video_open(cur_stream);
}
void ff_thread_flush(AVCodecContext *avctx)
{
void ff_thread_flush(AVCodecContext *avctx)
{
FrameThreadContext *fctx = avctx->thread_opaque;
if (!avctx->thread_opaque) return;
FrameThreadContext *fctx = avctx->thread_opaque;
if (!avctx->thread_opaque) return;
fctx->next_decoding = fctx->next_finished = 0;
fctx->delaying = 1;
fctx->prev_thread = NULL;
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;
PerThreadContext *p = &fctx->threads[i];
// Make sure decode flush calls with size=0 won't return old frames
p->got_frame = 0;
if(status.dropped_frames > 0) {
reset_dv1394();
} else {
if(status.dropped_frames > 0) {
reset_dv1394();
} else {
- for(int i = 0; i < status.n_clear_frames; i++) {
+ int i;
+ for (i = 0; i < status.n_clear_frames; i++) {