Browse Source

avformat/utils: Check bps before using it in a shift in ff_get_pcm_codec_id()

Fixes undefined shift
Fixes: usan_shift

Found-by: Thomas Guilbert <tguilbert@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.1
Michael Niedermayer 9 years ago
parent
commit
ea791c080d
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavformat/utils.c

+ 3
- 0
libavformat/utils.c View File

@@ -2955,6 +2955,9 @@ enum AVCodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag)

enum AVCodecID ff_get_pcm_codec_id(int bps, int flt, int be, int sflags)
{
if (bps > 64U)
return AV_CODEC_ID_NONE;

if (flt) {
switch (bps) {
case 32:


Loading…
Cancel
Save