From fa70ed4a032fa20cb922811494bc54d517072470 Mon Sep 17 00:00:00 2001 From: ods15 Date: Sat, 8 Oct 2005 17:21:00 +0000 Subject: 100000l to me fixdelay() pre-read a frame to make pts sane, and then called slowseek(), which AGAIN read another frame, and then tries to decode it (which breaks as all frames should be read) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16709 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mencoder.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'mencoder.c') diff --git a/mencoder.c b/mencoder.c index b0c6b623ea..16deef9af0 100644 --- a/mencoder.c +++ b/mencoder.c @@ -1690,9 +1690,12 @@ static int slowseek(float end_pts, demux_stream_t *d_video, demux_stream_t *d_au while (!interrupted) { float a_pts = 0.; - frame_data->in_size = video_read_frame(sh_video, &frame_data->frame_time, &frame_data->start, force_fps); - if(frame_data->in_size<0) return 2; - sh_video->timer += frame_data->frame_time; + if (!frame_data->already_read) { // when called after fixdelay, a frame is already read + frame_data->in_size = video_read_frame(sh_video, &frame_data->frame_time, &frame_data->start, force_fps); + if(frame_data->in_size<0) return 2; + sh_video->timer += frame_data->frame_time; + } + frame_data->already_read = 0; a_pts = forward_audio(sh_video->pts - frame_data->frame_time + audio_delay, d_audio, mux_a); -- cgit v1.2.3