[Mplayer-cvslog] CVS: main/libmpdemux demux_mf.c,1.9,1.10

Arpi of Ize arpi at mplayerhq.hu
Tue Jan 28 23:01:26 CET 2003


Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv25157

Modified Files:
	demux_mf.c 
Log Message:
type autodetection (from filemask/filelist extension)


Index: demux_mf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mf.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- demux_mf.c	15 Sep 2002 19:47:49 -0000	1.9
+++ demux_mf.c	28 Jan 2003 22:00:57 -0000	1.10
@@ -63,6 +63,17 @@
   mf_t         *mf = NULL;
   
   if(!demuxer->stream->url) return NULL;
+
+  if(!mf_type){
+    char* p=strrchr(demuxer->stream->url,'.');
+    if(!p){
+      mp_msg(MSGT_DEMUX, MSGL_INFO, "[demux_mf] file type was not set! (try -mf type=xxx)\n" );
+      free( mf ); return NULL;
+    }
+    mf_type=strdup(p+1);
+    mp_msg(MSGT_DEMUX, MSGL_INFO, "[demux_mf] file type was not set! trying 'type=%s'...\n", mf_type);
+  }
+
   mf=open_mf(demuxer->stream->url);
   if(!mf) return NULL;
   mf->curr_frame=0;
@@ -80,7 +91,7 @@
   // parent video demuxer stream (this is getting wacky), or else
   // video_read_properties() will choke
   sh_video->ds = demuxer->video;
-
+  
   if ( !strcasecmp( mf_type,"jpg" ) || 
         !(strcasecmp(mf_type, "jpeg"))) sh_video->format = mmioFOURCC('I', 'J', 'P', 'G');
   else 



More information about the MPlayer-cvslog mailing list