[SCM] libav/experimental: convert a if() into a switch() to ease addition of new tags to probe

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:08:41 UTC 2013


The following commit has been merged in the experimental branch:
commit 39fe9d79ad27a9bed9bdfcb3973382237247d7a3
Author: Aurelien Jacobs <aurel at gnuage.org>
Date:   Mon Oct 22 21:06:04 2007 +0000

    convert a if() into a switch() to ease addition of new tags to probe
    
    Originally committed as revision 10843 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 7cf15ef..b4c14e0 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -227,12 +227,11 @@ static int process_ea_header(AVFormatContext *s) {
 
 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;
 }
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list