aboutsummaryrefslogtreecommitdiff
path: root/libavformat/sol.c
diff options
context:
space:
mode:
authorVittorio Giovara2014-11-21 12:57:35 +0000
committerVittorio Giovara2014-11-24 01:30:15 +0000
commit30b8eb0f87b0eaefdc115ef38f8ad87dd3a6e50b (patch)
tree4b99975c3ef010d214989b3405ee1c924e718273 /libavformat/sol.c
parentb99ca863506f0630514921b740b78364de67a3ff (diff)
sol: simplify sol_codec_id()
Bug-Id: CID 1238993
Diffstat (limited to 'libavformat/sol.c')
-rw-r--r--libavformat/sol.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/libavformat/sol.c b/libavformat/sol.c
index 92599b163d..30f0547d1d 100644
--- a/libavformat/sol.c
+++ b/libavformat/sol.c
@@ -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;
}