aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-02-01 10:32:17 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-02-01 10:32:17 +0000
commitf5668147cb39a67f8c3f97df5993aaf7653c0f62 (patch)
treec368aa0bf66d36ca1e4904ee4fbb36ad49df6e32 /ffplay.c
parent8e14fbe89bf1903b2df37399d961dad5458288a1 (diff)
downloadffmpeg-f5668147cb39a67f8c3f97df5993aaf7653c0f62.tar.gz
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
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ffplay.c b/ffplay.c
index 097a82c289..9fc8f383fe 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -115,6 +115,7 @@ typedef struct VideoState {
int seek_flags;
int64_t seek_pos;
int64_t seek_rel;
+ int read_pause_return;
AVFormatContext *ic;
int dtg_active_format;
@@ -991,8 +992,12 @@ static void stream_pause(VideoState *is)
{
is->paused = !is->paused;
if (!is->paused) {
- is->video_current_pts = get_video_clock(is);
+ if(is->read_pause_return != AVERROR(ENOSYS)){
+ is->video_current_pts = get_video_clock(is);
+ }
+
is->frame_timer += (av_gettime() - is->video_current_pts_time) / 1000000.0;
+ is->video_current_pts_time= av_gettime();
}
}
@@ -2007,7 +2012,7 @@ static int decode_thread(void *arg)
if (is->paused != is->last_paused) {
is->last_paused = is->paused;
if (is->paused)
- av_read_pause(ic);
+ is->read_pause_return= av_read_pause(ic);
else
av_read_play(ic);
}