changeset 2661:bed166d88f63 libavformat

convert a if() into a switch() to ease addition of new tags to probe
author aurel
date Mon, 22 Oct 2007 21:06:04 +0000
parents 022174d849d5
children 08b1ac852321
files electronicarts.c
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/electronicarts.c	Mon Oct 22 14:36:14 2007 +0000
+++ b/electronicarts.c	Mon Oct 22 21:06:04 2007 +0000
@@ -227,12 +227,11 @@
 
 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;
 }