changeset 17624:7b30bef00830

allow autodetection of pictures type when using mf://@file.list syntax autodetection is based on first picture instead of the url
author iive
date Tue, 14 Feb 2006 09:34:30 +0000
parents 22db9136d4f5
children c5f33a8021c7
files libmpdemux/demux_mf.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mf.c	Mon Feb 13 12:49:15 2006 +0000
+++ b/libmpdemux/demux_mf.c	Tue Feb 14 09:34:30 2006 +0000
@@ -68,8 +68,12 @@
   
   if(!demuxer->stream->url) return NULL;
 
+
+  mf=open_mf(demuxer->stream->url + 5);
+  if(!mf) return NULL;
+
   if(!mf_type){
-    char* p=strrchr(demuxer->stream->url,'.');
+    char* p=strrchr(mf->names[0],'.');
     if(!p){
       mp_msg(MSGT_DEMUX, MSGL_INFO, "[demux_mf] file type was not set! (try -mf type=xxx)\n" );
       free( mf ); return NULL;
@@ -78,8 +82,6 @@
     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 + 5);
-  if(!mf) return NULL;
   mf->curr_frame=0;
 
   demuxer->movi_start = 0;