sol: simplify sol_codec_id()
authorVittorio Giovara <vittorio.giovara@gmail.com>
Fri, 21 Nov 2014 12:57:35 +0000 (12:57 +0000)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Mon, 24 Nov 2014 01:30:15 +0000 (01:30 +0000)
Bug-Id: CID 1238993

libavformat/sol.c

index 92599b1..30f0547 100644 (file)
@@ -50,18 +50,15 @@ static int sol_probe(AVProbeData *p)
 
 static enum AVCodecID sol_codec_id(int magic, int type)
 {
-    if (magic == 0x0B8D)
-    {
-        if (type & SOL_DPCM) return AV_CODEC_ID_SOL_DPCM;
-        else return AV_CODEC_ID_PCM_U8;
-    }
     if (type & SOL_DPCM)
-    {
-        if (type & SOL_16BIT) return AV_CODEC_ID_SOL_DPCM;
-        else if (magic == 0x0C8D) return AV_CODEC_ID_SOL_DPCM;
-        else return AV_CODEC_ID_SOL_DPCM;
-    }
-    if (type & SOL_16BIT) return AV_CODEC_ID_PCM_S16LE;
+        return AV_CODEC_ID_SOL_DPCM;
+
+    if (magic == 0x0B8D)
+        return AV_CODEC_ID_PCM_U8;
+
+    if (type & SOL_16BIT)
+        return AV_CODEC_ID_PCM_S16LE;
+
     return AV_CODEC_ID_PCM_U8;
 }