schedule_refresh(is, vp->delay);
schedule_refresh(is, (int)(actual_delay * 1000 + 0.5));  #if defined(DEBUG_SYNC) printf("video: delay=%0.3f actual_delay=%0.3f pts=%0.3f A-V=%f\n", delay, actual_delay, vp->pts, -diff); #endif
static void video_refresh_timer(void *opaque){    VideoState *is = opaque;    VideoPicture *vp;    if (is->video_st) {        if (is->pictq_size == 0) {            /* if no picture, need to wait */            schedule_refresh(is, 40);        } else {            vp = &is->pictq[is->pictq_rindex];                        /* launch timer for next picture */            schedule_refresh(is, vp->delay);            /* display picture */            video_display(is);                        /* update queue size and signal for next picture */            if (++is->pictq_rindex == VIDEO_PICTURE_QUEUE_SIZE)                is->pictq_rindex = 0;                        SDL_LockMutex(is->pictq_mutex);            is->pictq_size--;            SDL_CondSignal(is->pictq_cond);            SDL_UnlockMutex(is->pictq_mutex);        }    } else if (is->audio_st) {        /* draw the next audio frame */        schedule_refresh(is, 40);        /* if only audio stream, then display the audio bars (better           than nothing, just to test the implementation */                /* display picture */        video_display(is);    } else {        schedule_refresh(is, 100);    }    if (show_status) {        static int64_t last_time;        int64_t cur_time;        int aqsize, vqsize;                cur_time = av_gettime();        if (!last_time || (cur_time - last_time) >= 500 * 1000) {            aqsize = 0;            vqsize = 0;            if (is->audio_st)                aqsize = is->audioq.size;            if (is->video_st)                vqsize = is->videoq.size;            printf("A:%7.2f V:%7.2f aq=%5dKB vq=%5dKB    \r",                    is->audio_clock, is->video_clock, aqsize / 1024, vqsize / 1024);            fflush(stdout);            last_time = cur_time;        }    }}