[MPlayer-advusers] [patch] slow menus
Dominik 'Rathann' Mierzejewski
dominik at rangers.eu.org
Sun Jan 7 12:20:21 CET 2007
On Saturday, 06 January 2007 at 23:13, Adam Sulmicki wrote:
>
> hello,
> Attached is a patch that should fix slow menus.
Patches should be sent to mplayer-dev-eng.
> Index: libmenu/vf_menu.c
> ===================================================================
> --- libmenu/vf_menu.c (wersja 21839)
> +++ libmenu/vf_menu.c (kopia robocza)
> @@ -230,20 +230,26 @@
> }
> menu_draw(vf->priv->current,dmpi);
>
> - } else {
> + } else { // show=0
> +
> 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;
> + 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);
> +
> + 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, pts);
> }
And any cosmetic changes (like indentation changes) should sent in
a separate patch. Please follow http://www.mplayerhq.hu/DOCS/tech/patches.txt
Regards,
R.
--
MPlayer developer and RPMs maintainer: http://mplayerhq.hu http://rpm.livna.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
More information about the MPlayer-advusers
mailing list