mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Fix to loss of sync in ffplay when paused patch by (Michael McConnell /// soruk put at here eridani and here a dot co.uk)
Originally committed as revision 7866 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
6d3d8daef9
commit
917fa192c7
3
ffplay.c
3
ffplay.c
@ -984,8 +984,9 @@ static void stream_seek(VideoState *is, int64_t pos, int rel)
|
|||||||
static void stream_pause(VideoState *is)
|
static void stream_pause(VideoState *is)
|
||||||
{
|
{
|
||||||
is->paused = !is->paused;
|
is->paused = !is->paused;
|
||||||
if (is->paused) {
|
if (!is->paused) {
|
||||||
is->video_current_pts = get_video_clock(is);
|
is->video_current_pts = get_video_clock(is);
|
||||||
|
is->frame_timer += (av_gettime() - is->video_current_pts_time) / 1000000.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user