# HG changeset patch # User ods15 # Date 1128792060 0 # Node ID 89504641c2a5d586eac361ff5339f03263b6a681 # Parent 8012348a44cc58a1e8979f2a936e9b8467c21d07 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) diff -r 8012348a44cc -r 89504641c2a5 mencoder.c --- a/mencoder.c Fri Oct 07 08:02:13 2005 +0000 +++ b/mencoder.c Sat Oct 08 17:21:00 2005 +0000 @@ -1690,9 +1690,12 @@ 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);