diff options
Diffstat (limited to 'gst-libs/ext/libav/libavcodec/twinvq.c')
-rw-r--r-- | gst-libs/ext/libav/libavcodec/twinvq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gst-libs/ext/libav/libavcodec/twinvq.c b/gst-libs/ext/libav/libavcodec/twinvq.c index 8989469..f6c897f 100644 --- a/gst-libs/ext/libav/libavcodec/twinvq.c +++ b/gst-libs/ext/libav/libavcodec/twinvq.c @@ -1142,6 +1142,10 @@ static av_cold int twin_decode_init(AVCodecContext *avctx) AV_CH_LAYOUT_STEREO; ibps = avctx->bit_rate / (1000 * avctx->channels); + if (ibps < 8 || ibps > 48) { + av_log(avctx, AV_LOG_ERROR, "Bad bitrate per channel value %d\n", ibps); + return AVERROR_INVALIDDATA; + } switch ((isampf << 8) + ibps) { case (8 <<8) + 8: tctx->mtab = &mode_08_08; break; |