mirror of https://github.com/mpv-player/mpv
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:
parent
05e6f3c577
commit
0aa37a0db2
|
@ -68,8 +68,12 @@ static demuxer_t* demux_open_mf(demuxer_t* demuxer){
|
||||||
|
|
||||||
if(!demuxer->stream->url) return NULL;
|
if(!demuxer->stream->url) return NULL;
|
||||||
|
|
||||||
|
|
||||||
|
mf=open_mf(demuxer->stream->url + 5);
|
||||||
|
if(!mf) return NULL;
|
||||||
|
|
||||||
if(!mf_type){
|
if(!mf_type){
|
||||||
char* p=strrchr(demuxer->stream->url,'.');
|
char* p=strrchr(mf->names[0],'.');
|
||||||
if(!p){
|
if(!p){
|
||||||
mp_msg(MSGT_DEMUX, MSGL_INFO, "[demux_mf] file type was not set! (try -mf type=xxx)\n" );
|
mp_msg(MSGT_DEMUX, MSGL_INFO, "[demux_mf] file type was not set! (try -mf type=xxx)\n" );
|
||||||
free( mf ); return NULL;
|
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);
|
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;
|
mf->curr_frame=0;
|
||||||
|
|
||||||
demuxer->movi_start = 0;
|
demuxer->movi_start = 0;
|
||||||
|
|
Loading…
Reference in New Issue