History

Try to more completely update time variables on unpause. Could not notice a differenc in behavior.

Originally committed as revision 21584 to svn://svn.ffmpeg.org/ffmpeg/trunk

Michael Niedermayer committed 16 years ago

Commit f5668141 parent 8e14fbe1 file · +7 −2Browse files

Unified · Split

ffplay.c+7−2
@@ -115,6 +115,7 @@ typedef struct VideoState { · 114 unmodified lines
115 int seek_flags;115 int seek_flags;
116 int64_t seek_pos;116 int64_t seek_pos;
117 int64_t seek_rel;117 int64_t seek_rel;
118 int read_pause_return;
118 AVFormatContext *ic;119 AVFormatContext *ic;
119 int dtg_active_format;120 int dtg_active_format;
120 121
@@ -991,8 +992,12 @@ static void stream_pause(VideoState *is) · 870 unmodified lines
991{992{
992 is->paused = !is->paused;993 is->paused = !is->paused;
993 if (!is->paused) {994 if (!is->paused) {
994 is->video_current_pts = get_video_clock(is);995 if(is->read_pause_return != AVERROR(ENOSYS)){
996 is->video_current_pts = get_video_clock(is);
997 }
998
995 is->frame_timer += (av_gettime() - is->video_current_pts_time) / 1000000.0;999 is->frame_timer += (av_gettime() - is->video_current_pts_time) / 1000000.0;
1000 is->video_current_pts_time= av_gettime();
996 }1001 }
997}1002}
998 1003
@@ -2007,7 +2012,7 @@ static int decode_thread(void *arg) · 1008 unmodified lines
2007 if (is->paused != is->last_paused) {2012 if (is->paused != is->last_paused) {
2008 is->last_paused = is->paused;2013 is->last_paused = is->paused;
2009 if (is->paused)2014 if (is->paused)
2010 av_read_pause(ic);2015 is->read_pause_return= av_read_pause(ic);
2011 else2016 else
2012 av_read_play(ic);2017 av_read_play(ic);
2013 }2018 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t