diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2007-10-22 21:06:04 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2007-10-22 21:06:04 +0000 |
commit | 39fe9d79ad27a9bed9bdfcb3973382237247d7a3 (patch) | |
tree | 533d9c4a23a3359d06d0fe748485bb48e9883df2 /libavformat | |
parent | ef59bf60c0297c476f6485b9808768776ed1fe90 (diff) | |
download | ffmpeg-39fe9d79ad27a9bed9bdfcb3973382237247d7a3.tar.gz |
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
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/electronicarts.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index 7cf15efd8b..b4c14e0080 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; } |