[MPlayer-cvslog] CVS: main mencoder.c,1.306,1.307

Oded Shimon CVS syncmail at mplayerhq.hu
Sat Oct 8 19:21:03 CEST 2005


CVS change done by Oded Shimon CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv3453

Modified Files:
	mencoder.c 
Log Message:
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)


Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.306
retrieving revision 1.307
diff -u -r1.306 -r1.307
--- mencoder.c	19 Sep 2005 19:23:38 -0000	1.306
+++ mencoder.c	8 Oct 2005 17:21:00 -0000	1.307
@@ -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);
 




More information about the MPlayer-cvslog mailing list