Originally committed as revision 21586 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -1061,8 +1061,7 @@ static void video_refresh_timer(void *opaque) · 1060 unmodified lines | ||
| 1061 | 1061 | |
| 1062 | 1062 | if (is->video_st) { |
| 1063 | 1063 | if (is->pictq_size == 0) { |
| 1064 | − /* if no picture, need to wait */ | |
| 1065 | − schedule_refresh(is, 1); | |
| 1064 | +// fprintf(stderr, "Internal error detected in the SDL timer\n"); | |
| 1066 | 1065 | } else { |
| 1067 | 1066 | /* dequeue the picture */ |
| 1068 | 1067 | vp = &is->pictq[is->pictq_rindex]; |
| @@ -1071,9 +1070,6 @@ static void video_refresh_timer(void *opaque) · 2 unmodified lines | ||
| 1071 | 1070 | is->video_current_pts = vp->pts; |
| 1072 | 1071 | is->video_current_pts_drift = is->video_current_pts - av_gettime() / 1000000.0; |
| 1073 | 1072 | |
| 1074 | − /* launch timer for next picture */ | |
| 1075 | − schedule_refresh(is, (int)(compute_frame_delay(vp->pts, is) * 1000 + 0.5)); | |
| 1076 | − | |
| 1077 | 1073 | if(is->subtitle_st) { |
| 1078 | 1074 | if (is->subtitle_stream_changed) { |
| 1079 | 1075 | SDL_LockMutex(is->subpq_mutex); |
| @@ -1282,6 +1278,7 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts) · 202 unmodified lines | ||
| 1282 | 1278 | SDL_LockMutex(is->pictq_mutex); |
| 1283 | 1279 | is->pictq_size++; |
| 1284 | 1280 | SDL_UnlockMutex(is->pictq_mutex); |
| 1281 | + schedule_refresh(is, (int)(compute_frame_delay(vp->pts, is) * 1000 + 0.5)); | |
| 1285 | 1282 | } |
| 1286 | 1283 | return 0; |
| 1287 | 1284 | } |