MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / stream_pause

Function stream_pause

ffplay.c:1106–1116  ·  view source on GitHub ↗

pause or resume the video */

Source from the content-addressed store, hash-verified

1104
1105/* pause or resume the video */
1106static 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
1118static double compute_target_time(double frame_current_pts, VideoState *is)
1119{

Callers 3

video_threadFunction · 0.85
toggle_pauseFunction · 0.85
step_to_next_frameFunction · 0.85

Calls 1

av_gettimeFunction · 0.85

Tested by

no test coverage detected