[MPlayer-dev-eng] [PATCH] mplayer through ssh
D Richard Felker III
dalias at aerifal.cx
Mon Sep 23 23:44:09 CEST 2002
On Mon, Sep 23, 2002 at 10:18:00PM +0200, Denis Ducamp wrote:
> Modern versions of OpenSSH listen on localhost to forward the X11 connection
> (X11UseLocalhost defaults to yes). The following patch permits to consider
> as non local any DISPLAY environment which port is greater or equal to 10
> else mplayer tries a local optimization on a distant X server which doesn't
> work.
>
> I use this patch since a few weeks and it works for me localy:
>
> vo: X11 running at 1400x1050 with depth 16 and 16 bpp (":0.0" => local display)
> [...]
> VO: [xv] 352x264 => 352x264 Planar YV12
>
> and distantly:
>
> Xlib: extension "XFree86-VidModeExtension" missing on display "localhost:15.0".
> vo: X11 running at 1280x1024 with depth 16 and 16 bpp (":15.0" => remote display)
> [...]
> VO: [xv] 352x264 => 352x264 Planar YV12
> Shared memory not supported
> Reverting to normal Xv
>
> In fact a better patch would test that only if DISPLAY begins with
> localhost:
>
> Thanks again for mplayer :-)
>
> Best regards,
>
> Denis Ducamp.
> Index: libvo/x11_common.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
> retrieving revision 1.98
> diff -u -r1.98 x11_common.c
> --- libvo/x11_common.c 18 Sep 2002 01:22:03 -0000 1.98
> +++ libvo/x11_common.c 23 Sep 2002 20:22:22 -0000
> @@ -303,7 +303,7 @@
> dispName += 4;
> else if ( strncmp(dispName, "localhost:", 10) == 0)
> dispName += 9;
> - if (*dispName==':') mLocalDisplay=1; else mLocalDisplay=0;
> + if (*dispName==':' && atoi(dispName+1)<10) mLocalDisplay=1; else mLocalDisplay=0;
This is a bad hack. The correct fix is making it so mplayer falls back
gracefully if it can't do the vidmode stuff.
Rich
More information about the MPlayer-dev-eng
mailing list