summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-02-03 21:33:31 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-02-03 21:33:31 +0000
commitb25453bdfc0c8e4d28507d160ff8fe85e6415460 (patch)
treed9663a37a2c1c348bf0ac4e00e57d2baef6b14a9 /ffplay.c
parentcedac8825077c3557b1a42a81c51dd39050dd883 (diff)
Move is->frame_timer init from start to flush_pkt handling so it is also
done on seeking. This fixes the bug where after reaching the end and waiting a few seconds seeking back to the begin messes up AV sync and playback speed. Originally committed as revision 21629 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index 7aa742d909..bf4f733cdf 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1369,6 +1369,7 @@ static int video_thread(void *arg)
is->last_pts_for_fault_detection= INT64_MIN;
is->frame_last_pts= AV_NOPTS_VALUE;
is->frame_last_delay = 0;
+ is->frame_timer = (double)av_gettime() / 1000000.0;
continue;
}
@@ -1820,7 +1821,6 @@ static int stream_component_open(VideoState *is, int stream_index)
is->video_stream = stream_index;
is->video_st = ic->streams[stream_index];
- is->frame_timer = (double)av_gettime() / 1000000.0;
// is->video_current_pts_time = av_gettime();
packet_queue_init(&is->videoq);