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

Nico Sabbi nicola_sabbi at fastwebnet.it
Fri Feb 24 23:53:50 CET 2006


Rich Felker wrote:

>On Fri, Feb 24, 2006 at 04:17:19PM +0100, Benjamin Zores wrote:
>  
>
>>This patch allows playback of .IFO (DVD) files.
>>
>>    
>>
>

[snip]

>>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
>  
>

I'll add my share: never  touch general-scope code such as stream.c for 
this kind of
work. Eventually patch stream_dvd.c




More information about the MPlayer-dev-eng mailing list