From 0aa37a0db23c74555c9b79a45ab135b091cf3b84 Mon Sep 17 00:00:00 2001 From: iive Date: Tue, 14 Feb 2006 09:34:30 +0000 Subject: [PATCH] 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 --- libmpdemux/demux_mf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libmpdemux/demux_mf.c b/libmpdemux/demux_mf.c index 5139640faa..415ff0a68b 100644 --- a/libmpdemux/demux_mf.c +++ b/libmpdemux/demux_mf.c @@ -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;