[MPlayer-dev-eng] [PATCH 5/11] MPlayer <-> GeeXboX patches port : Playback of IFO files

Rich Felker dalias at aerifal.cx
Fri Feb 24 18:05:55 CET 2006


On Fri, Feb 24, 2006 at 04:17:19PM +0100, Benjamin Zores wrote:
> 
> This patch allows playback of .IFO (DVD) files.
> 
> It simulates the following :
> 
> mplayer /path/to/DVD/VIDEO_TS/VIDEO_TS.IFO
> 
> is now the same than :
> 
> mplayer -dvd-device /path/to/DVD/ dvd://
> 
> It might be useless except for playing dumped DVD disc from libmenu Open menu.
> 
> Ben
> 
> -- 
> "My life, and by extension everyone else's is meaningless."
> Bender, Futurama
> 

> Index: MPlayer-20051213/libmpdemux/stream.c
> ===================================================================
> --- MPlayer-20051213.orig/libmpdemux/stream.c	2006-02-23 10:49:35.000000000 +0100
> +++ MPlayer-20051213/libmpdemux/stream.c	2006-02-23 10:51:14.000000000 +0100
> @@ -183,7 +183,17 @@
>    int i,j,l,r;
>    stream_info_t* sinfo;
>    stream_t* s;
> +  char *ext = NULL;
>  
> +  ext = strrchr (filename, '.');
> +  if (ext && !strcasecmp (ext + 1, "ifo"))
> +  {
> +    extern char *dvd_device;
> +    dvd_device = dirname (strdup (filename));
> +    dvd_title = 1;
> +    filename = "dvd://";
> +  }

Special-casing a file suffix like this is not acceptable. You'll have
to unify this with the code that autodetects file format. File suffix
can be used as a hint, but this patch will make it impossible to play
an mpeg file that's been renamed to .ifo, which is not ok.

Rich




More information about the MPlayer-dev-eng mailing list