pause or resume the video */
| 1104 | |
| 1105 | /* pause or resume the video */ |
| 1106 | static void stream_pause(VideoState *is) |
| 1107 | { |
| 1108 | if (is->paused) { |
| 1109 | is->frame_timer += av_gettime() / 1000000.0 + is->video_current_pts_drift - is->video_current_pts; |
| 1110 | if(is->read_pause_return != AVERROR(ENOSYS)){ |
| 1111 | is->video_current_pts = is->video_current_pts_drift + av_gettime() / 1000000.0; |
| 1112 | } |
| 1113 | is->video_current_pts_drift = is->video_current_pts - av_gettime() / 1000000.0; |
| 1114 | } |
| 1115 | is->paused = !is->paused; |
| 1116 | } |
| 1117 | |
| 1118 | static double compute_target_time(double frame_current_pts, VideoState *is) |
| 1119 | { |
no test coverage detected