mirror of https://github.com/mpv-player/mpv
file format detection reordered to get better hits
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3257 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
c5347864c0
commit
0f1fa8e4fc
|
@ -385,19 +385,6 @@ if((tv_param_on == 1) &&
|
|||
file_format=DEMUXER_TYPE_TV;
|
||||
}
|
||||
#endif
|
||||
//=============== Try to open as FLI file: =================
|
||||
if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_FLI){
|
||||
demuxer=new_demuxer(stream,DEMUXER_TYPE_FLI,audio_id,video_id,dvdsub_id);
|
||||
{
|
||||
int size=stream_read_dword_le(demuxer->stream);
|
||||
int id=stream_read_word_le(demuxer->stream);
|
||||
// chech for the FLI file magic number
|
||||
if((id==0xAF11) || (id==0xAF12)){
|
||||
mp_msg(MSGT_DEMUXER,MSGL_INFO,MSGTR_DetectedFLIfile);
|
||||
file_format=DEMUXER_TYPE_FLI;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=============== Try to open as AVI file: =================
|
||||
if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_AVI){
|
||||
|
@ -430,6 +417,27 @@ if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_MOV){
|
|||
file_format=DEMUXER_TYPE_MOV;
|
||||
}
|
||||
}
|
||||
//=============== Try to open as VIVO file: =================
|
||||
if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_VIVO){
|
||||
demuxer=new_demuxer(stream,DEMUXER_TYPE_VIVO,audio_id,video_id,dvdsub_id);
|
||||
if(vivo_check_file(demuxer)){
|
||||
mp_msg(MSGT_DEMUXER,MSGL_INFO,"Detected VIVO file format!\n");
|
||||
file_format=DEMUXER_TYPE_VIVO;
|
||||
}
|
||||
}
|
||||
//=============== Try to open as FLI file: =================
|
||||
if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_FLI){
|
||||
demuxer=new_demuxer(stream,DEMUXER_TYPE_FLI,audio_id,video_id,dvdsub_id);
|
||||
{
|
||||
int size=stream_read_dword_le(demuxer->stream);
|
||||
int id=stream_read_word_le(demuxer->stream);
|
||||
// chech for the FLI file magic number
|
||||
if((id==0xAF11) || (id==0xAF12)){
|
||||
mp_msg(MSGT_DEMUXER,MSGL_INFO,MSGTR_DetectedFLIfile);
|
||||
file_format=DEMUXER_TYPE_FLI;
|
||||
}
|
||||
}
|
||||
}
|
||||
//=============== Try to open as MPEG-PS file: =================
|
||||
if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_MPEG_PS){
|
||||
int pes=1;
|
||||
|
@ -477,14 +485,6 @@ if(file_format==DEMUXER_TYPE_MPEG_ES){ // little hack, see above!
|
|||
mp_msg(MSGT_DEMUXER,MSGL_INFO,MSGTR_DetectedMPEGESfile);
|
||||
}
|
||||
}
|
||||
//=============== Try to open as VIVO file: =================
|
||||
if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_VIVO){
|
||||
demuxer=new_demuxer(stream,DEMUXER_TYPE_VIVO,audio_id,video_id,dvdsub_id);
|
||||
if(vivo_check_file(demuxer)){
|
||||
mp_msg(MSGT_DEMUXER,MSGL_INFO,"Detected VIVO file format!\n");
|
||||
file_format=DEMUXER_TYPE_VIVO;
|
||||
}
|
||||
}
|
||||
//=============== Unknown, exiting... ===========================
|
||||
if(file_format==DEMUXER_TYPE_UNKNOWN){
|
||||
mp_msg(MSGT_DEMUXER,MSGL_ERR,MSGTR_FormatNotRecognized);
|
||||
|
|
Loading…
Reference in New Issue