[Mplayer-cvslog] CVS: main/libmenu vf_menu.c,1.2,1.3

Colin Leroy CVS colin at mplayerhq.hu
Thu Nov 21 19:31:41 CET 2002


Update of /cvsroot/mplayer/main/libmenu
In directory mail:/var/tmp.root/cvs-serv18355/libmenu

Modified Files:
	vf_menu.c 
Log Message:
don't fully-copy the planes if the menu doesn't show (faster)


Index: vf_menu.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmenu/vf_menu.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vf_menu.c	18 Nov 2002 00:09:37 -0000	1.2
+++ vf_menu.c	21 Nov 2002 18:31:21 -0000	1.3
@@ -165,6 +165,7 @@
 static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
   mp_image_t *dmpi = NULL;
 
+  if(vf->priv->current->show) {
   // Close all menu who requested it
   while(vf->priv->current->cl && vf->priv->current != vf->priv->root) {
     menu_t* m = vf->priv->current;
@@ -207,6 +208,21 @@
   }
   menu_draw(vf->priv->current,dmpi);
 
+  } else {
+    if(mp_input_key_cb)
+      mp_input_key_cb = NULL;
+    dmpi = vf_get_image(vf->next,mpi->imgfmt,
+			MP_IMGTYPE_EXPORT, MP_IMGFLAG_ACCEPT_STRIDE,
+			mpi->w,mpi->h);
+
+    dmpi->stride[0] = mpi->stride[0];
+    dmpi->stride[1] = mpi->stride[1];
+    dmpi->stride[2] = mpi->stride[2];
+    dmpi->planes[0] = mpi->planes[0];
+    dmpi->planes[1] = mpi->planes[1];
+    dmpi->planes[2] = mpi->planes[2];
+    dmpi->priv      = mpi->priv;
+  }
   return vf_next_put_image(vf,dmpi);
 }
 




More information about the MPlayer-cvslog mailing list