diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-11-24 13:09:49 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-24 13:10:16 +0100 |
commit | 4fecf170d75daf24bab3b80e45904089926bf3c1 (patch) | |
tree | eda73a102f8e37b68bf885f52172675e017ec514 /libavformat/sol.c | |
parent | bcaef717ec0ff957ae438aa274e1685d7ebfd979 (diff) | |
parent | 30b8eb0f87b0eaefdc115ef38f8ad87dd3a6e50b (diff) | |
download | ffmpeg-4fecf170d75daf24bab3b80e45904089926bf3c1.tar.gz |
Merge commit '30b8eb0f87b0eaefdc115ef38f8ad87dd3a6e50b'
* commit '30b8eb0f87b0eaefdc115ef38f8ad87dd3a6e50b':
sol: simplify sol_codec_id()
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/sol.c')
-rw-r--r-- | libavformat/sol.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/libavformat/sol.c b/libavformat/sol.c index 27d355156b..c9434535ef 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; } |