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 | if (is->video_st) { | 1062 | if (is->video_st) { |
| 1063 | if (is->pictq_size == 0) { | 1063 | if (is->pictq_size == 0) { |
| 1064 | /* if no picture, need to wait */ | 1064 | // fprintf(stderr, "Internal error detected in the SDL timer\n"); |
| 1065 | schedule_refresh(is, 1); | ||
| 1066 | } else { | 1065 | } else { |
| 1067 | /* dequeue the picture */ | 1066 | /* dequeue the picture */ |
| 1068 | vp = &is->pictq[is->pictq_rindex]; | 1067 | vp = &is->pictq[is->pictq_rindex]; |
| @@ -1071,9 +1070,6 @@ static void video_refresh_timer(void *opaque) · 2 unmodified lines | |||
| 1071 | is->video_current_pts = vp->pts; | 1070 | is->video_current_pts = vp->pts; |
| 1072 | is->video_current_pts_drift = is->video_current_pts - av_gettime() / 1000000.0; | 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 | if(is->subtitle_st) { | 1073 | if(is->subtitle_st) { |
| 1078 | if (is->subtitle_stream_changed) { | 1074 | if (is->subtitle_stream_changed) { |
| 1079 | SDL_LockMutex(is->subpq_mutex); | 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 | SDL_LockMutex(is->pictq_mutex); | 1278 | SDL_LockMutex(is->pictq_mutex); |
| 1283 | is->pictq_size++; | 1279 | is->pictq_size++; |
| 1284 | SDL_UnlockMutex(is->pictq_mutex); | 1280 | SDL_UnlockMutex(is->pictq_mutex); |
| 1281 | schedule_refresh(is, (int)(compute_frame_delay(vp->pts, is) * 1000 + 0.5)); | ||
| 1285 | } | 1282 | } |
| 1286 | return 0; | 1283 | return 0; |
| 1287 | } | 1284 | } |