[MPlayer-users] Step-by-step frames

Ville Saari 113762 at foo.bar.org
Wed Jun 9 20:48:00 CEST 2004


On Mon, Jun 07, 2004 at 09:18:40PM +0400, Mikhail Ramendik wrote:

> So I would like to view a still image and step to the next frame on
> pressing a key. Can MPlayer do this? 

Yes it can - with a little help. Apply the attached patch and then you
can use the right arrow key to make paused mplayer advance to next frame.

-- 
 Ville
-------------- next part --------------
--- ../main/mplayer.c	2004-04-30 23:05:54.000000000 +0300
+++ mplayer.c	2004-06-09 21:38:37.000000000 +0300
@@ -752,6 +752,7 @@
 
 int gui_no_filename=0;
 
+int autopause=0;
 
   srand((int) time(NULL)); 
 
@@ -2409,7 +2410,7 @@
   }
 #endif
 
-  if(osd_function==OSD_PAUSE){
+  if(osd_function==OSD_PAUSE || autopause){
     mp_cmd_t* cmd;
       if(!quiet) {
 	mp_msg(MSGT_CPLAYER,MSGL_STATUS,MSGTR_Paused);
@@ -2439,6 +2440,9 @@
 #endif
              usec_sleep(20000);
          }
+
+      autopause=cmd->id==MP_CMD_SEEK;
+
       mp_cmd_free(cmd);
          osd_function=OSD_PLAY;
       if (audio_out && sh_audio)


More information about the MPlayer-users mailing list