aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/twinvqdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer2013-09-18 12:26:32 +0200
committerMichael Niedermayer2013-09-18 12:42:19 +0200
commit015f7ce7d7dfac0469dbacc5022840cd0bf225fc (patch)
treed1f6c4d8f7d55818358c3e0bc07e1a07c8a5d354 /libavcodec/twinvqdec.c
parent4131a3cb58d93435acdbeda82957e42fcab41e07 (diff)
parentc77d409bf95954aceb762dd800d1ee2868c4b0d4 (diff)
Merge commit 'c77d409bf95954aceb762dd800d1ee2868c4b0d4'
* commit 'c77d409bf95954aceb762dd800d1ee2868c4b0d4': twinvqdec: Check the ibps parameter separately See: b8dc5f8bb3b14bfd2289a0444c7b706299555d97 See: 98b377004d9c6fa1c1756c814efe9882b65f96b9 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/twinvqdec.c')
-rw-r--r--libavcodec/twinvqdec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/twinvqdec.c b/libavcodec/twinvqdec.c
index 1445733f83..c072596279 100644
--- a/libavcodec/twinvqdec.c
+++ b/libavcodec/twinvqdec.c
@@ -356,9 +356,8 @@ static av_cold int twinvq_decode_init(AVCodecContext *avctx)
: AV_CH_LAYOUT_STEREO;
ibps = avctx->bit_rate / (1000 * avctx->channels);
-
- if (ibps > 255U) {
- av_log(avctx, AV_LOG_ERROR, "unsupported per channel bitrate %dkbps\n", ibps);
+ if (ibps < 8 || ibps > 48) {
+ av_log(avctx, AV_LOG_ERROR, "Bad bitrate per channel value %d\n", ibps);
return AVERROR_INVALIDDATA;
}