changeset 16708:89504641c2a5

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)
author ods15
date Sat, 08 Oct 2005 17:21:00 +0000
parents 8012348a44cc
children 661e71fd3a60
files mencoder.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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);