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
115115 int seek_flags;
116116 int64_t seek_pos;
117117 int64_t seek_rel;
118+ int read_pause_return;
118119 AVFormatContext *ic;
119120 int dtg_active_format;
120121
@@ -991,8 +992,12 @@ static void stream_pause(VideoState *is) · 870 unmodified lines
991992 {
992993 is->paused = !is->paused;
993994 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+
995999 is->frame_timer += (av_gettime() - is->video_current_pts_time) / 1000000.0;
1000+ is->video_current_pts_time= av_gettime();
9961001 }
9971002 }
9981003
@@ -2007,7 +2012,7 @@ static int decode_thread(void *arg) · 1008 unmodified lines
20072012 if (is->paused != is->last_paused) {
20082013 is->last_paused = is->paused;
20092014 if (is->paused)
2010− av_read_pause(ic);
2015+ is->read_pause_return= av_read_pause(ic);
20112016 else
20122017 av_read_play(ic);
20132018 }

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