[MPlayer-dev-eng] vo_x11: More than 1 video to play

Arpi arpi at thot.banki.hu
Mon Nov 5 17:28:34 CET 2001


Hi,

> If you give more than one file on the command line, mplayer (**ONLY** vo=x11 
> !!!!) plays the first file and exits with an error. There was a 
> misunderstanding in libvo/vo_x11.c what value to return in case of error/ok. 
> Fixing this, brought up further problems...
> 
> When looking more into the code, I wondered why vo_x11.c tracks if X is 
> already initialized (see places where the variable 'X_already_started' is 
> used). The video driver's uninit() gets called after each video always, 
> although it might not be the last video to play. In my opinion init() and 
> uninit() should be called only once for all videos to play. Changing this 
> behaviour would force some work in all libvo drivers. The appended patch 
> doesn't address this.
libvo2 addresses it...

> However, the attached patch fixes the initial problem. After applying the 
> patch, vo_x11 always does a full init() and a full unint(), plus some cleanup 
> in init/uninit.
ok
but what does this patch really do? i can't see things related to it:

> -static int X_already_started=0;
you completely removed this check. anyway it isn't requires for mplayer,
it was inherited from mpeg2dec

> -      if ((d_width==0) && (d_height==0))
> -        { X=image_width; Y=image_height; }
> -      else
> -        { X=d_width; Y=d_height; }
>  
>        for (i=1; i<modecount; i++)
> -        if ((vidmodes[i]->hdisplay >= X) && (vidmodes[i]->vdisplay >= Y))
> +        if ((vidmodes[i]->hdisplay >= image_width) && (vidmodes[i]->vdisplay 

but why is this change??? it may break -vm switch.

>  static void Display_Image( XImage *myximage,uint8_t *ImageData )
> @@ -590,10 +582,9 @@
>            XF86VidModeSwitchToMode(mDisplay,screen,vidmodes[0]);
>            XF86VidModeSwitchToMode(mDisplay,screen,vidmodes[0]);
>            free(vidmodes);
> +          vidmodes=NULL; // when playing more than 1 file, init() is called 
this seems to be ok


A'rpi / Astral & ESP-team

--
mailto:arpi at thot.banki.hu
http://esp-team.scene.hu



More information about the MPlayer-dev-eng mailing list