[MPlayer-users] BUG: sstep is broken [PATCH]

Pavlos Mavridis stud1313 at di.uoa.gr
Sat Aug 13 12:22:00 CEST 2005


This quick hack fixes the EOF detection, but the (rare) problem with 
some files not displaying anything when using sstep still remains. I can 
upload a sample video if the problem is hard to reproduce.

I'm not familiar with the mplayer code, this is a quick hack after 
taking a first glimpse at the code, so I'm sure there're better ways to 
do that. This code works for me but I cannot guarantee that I din't 
brake anything else.

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.859
diff -u -r1.859 mplayer.c
--- mplayer.c   5 Aug 2005 19:57:44 -0000       1.859
+++ mplayer.c   13 Aug 2005 09:52:50 -0000
@@ -2149,6 +2149,9 @@
  int frame_time_remaining=0; // flag
  int blit_frame=0;

+off_t seek_delta=0;
+off_t stream_old_pos=0;
+
  osd_text_buffer[0]=0;

  //================ SETUP AUDIO ==========================
@@ -3975,6 +3978,11 @@
    loop_seek=0;
  }

+seek_delta=stream->pos-stream_old_pos;
+stream_old_pos=stream->pos;
+if(seek_delta+stream->pos>=stream->end_pos)
+       eof=1;
+
  #ifdef HAVE_NEW_GUI
        if(use_gui){
          guiEventHandling();





More information about the MPlayer-users mailing list