[FFmpeg-cvslog] r10843 - trunk/libavformat/electronicarts.c

aurel subversion
Mon Oct 22 23:06:05 CEST 2007


Author: aurel
Date: Mon Oct 22 23:06:04 2007
New Revision: 10843

Log:
convert a if() into a switch() to ease addition of new tags to probe

Modified:
   trunk/libavformat/electronicarts.c

Modified: trunk/libavformat/electronicarts.c
==============================================================================
--- trunk/libavformat/electronicarts.c	(original)
+++ trunk/libavformat/electronicarts.c	Mon Oct 22 23:06:04 2007
@@ -227,12 +227,11 @@ static int process_ea_header(AVFormatCon
 
 static int ea_probe(AVProbeData *p)
 {
-    uint32_t tag;
-
-    tag = AV_RL32(&p->buf[0]);
-    if (tag == SCHl_TAG || tag == MVhd_TAG)
+    switch (AV_RL32(&p->buf[0])) {
+    case SCHl_TAG:
+    case MVhd_TAG:
         return AVPROBE_SCORE_MAX;
-
+    }
     return 0;
 }
 




More information about the ffmpeg-cvslog mailing list