allow autodetection of pictures type when using mf://@file.list syntax

autodetection is based on first picture instead of the url


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17625 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
iive 2006-02-14 09:34:30 +00:00
parent 05e6f3c577
commit 0aa37a0db2
1 changed files with 5 additions and 3 deletions

View File

@ -68,8 +68,12 @@ static demuxer_t* demux_open_mf(demuxer_t* demuxer){
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 @@ static demuxer_t* demux_open_mf(demuxer_t* demuxer){
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;