Browse Source

Merge commit '68ff9981283a56c731f00c2ee7901103665092fc'

* commit '68ff9981283a56c731f00c2ee7901103665092fc':
  vqf: Make sure the bitrate is in the valid range

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.1
Michael Niedermayer 12 years ago
parent
commit
b24f7cf950
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      libavformat/vqf.c

+ 7
- 0
libavformat/vqf.c View File

@@ -187,6 +187,13 @@ static int vqf_read_header(AVFormatContext *s)
break;
}

if (read_bitrate / st->codec->channels < 8 ||
read_bitrate / st->codec->channels > 48) {
av_log(s, AV_LOG_ERROR, "Invalid bitrate per channel %d\n",
read_bitrate / st->codec->channels);
return AVERROR_INVALIDDATA;
}

switch (((st->codec->sample_rate/1000) << 8) +
read_bitrate/st->codec->channels) {
case (11<<8) + 8 :


Loading…
Cancel
Save