summaryrefslogtreecommitdiffstats
path: root/libmenu
diff options
context:
space:
mode:
authorgpoirier <gpoirier@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-01-16 13:24:03 +0000
committergpoirier <gpoirier@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-01-16 13:24:03 +0000
commit7c450c5275c931db26936113375ea9a4008be737 (patch)
treef2af9954ed46ae39843a369c531fffcc1dd89848 /libmenu
parentf8aa0436015b31cdc278ad52dda4350f4106b1ed (diff)
downloadmpv-7c450c5275c931db26936113375ea9a4008be737.tar.bz2
mpv-7c450c5275c931db26936113375ea9a4008be737.tar.xz
speeds up mplayer execution by over FIVE times when all of the of the following apply:
* menus are enabled * menus are enabled but not displayed * direct rendering is in use Patch by Adam Sulmicki % adam A cfar P umd P edu % Original thread: date: Jan 7, 2007 11:07 PM subject: [MPlayer-dev-eng] [PATCH] slow menus : try two Other threads: date: Jan 7, 2007 12:39 PM subject: [MPlayer-advusers] [patch] slow menus Also: date: Jan 6, 2007 11:13 PM subject: [MPlayer-advusers] [patch] slow menus And: date: Jan 2, 2007 11:46 PM subject: [MPlayer-advusers] slow down with menu off Finaly: date: Dec 24, 2006 11:25 AM subject: [MPlayer-users] slow down with menu off git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21942 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmenu')
-rw-r--r--libmenu/vf_menu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libmenu/vf_menu.c b/libmenu/vf_menu.c
index e18420ece0..6a2d2ef35c 100644
--- a/libmenu/vf_menu.c
+++ b/libmenu/vf_menu.c
@@ -233,6 +233,10 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
} else {
if(mp_input_key_cb)
mp_input_key_cb = NULL;
+
+ if(mpi->flags&MP_IMGFLAG_DIRECT)
+ dmpi = mpi->priv;
+ else {
dmpi = vf_get_image(vf->next,mpi->imgfmt,
MP_IMGTYPE_EXPORT, MP_IMGFLAG_ACCEPT_STRIDE,
mpi->w,mpi->h);
@@ -245,6 +249,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
dmpi->planes[2] = mpi->planes[2];
dmpi->priv = mpi->priv;
}
+ }
return vf_next_put_image(vf,dmpi, pts);
}