changeset 3256:c42e6759c82b

file format detection reordered to get better hits
author arpi
date Sat, 01 Dec 2001 22:12:58 +0000
parents ee28577dad02
children b59502557e39
files libmpdemux/demuxer.c
diffstat 1 files changed, 21 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demuxer.c	Sat Dec 01 22:09:18 2001 +0000
+++ b/libmpdemux/demuxer.c	Sat Dec 01 22:12:58 2001 +0000
@@ -385,19 +385,6 @@
   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 @@
       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 @@
     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);