You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
wmapro: prevent division by zero when sample rate is unspecified
This fixes Bugzilla #327: Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This commit is contained in:
committed by
Ronald S. Bultje
parent
7191e1c490
commit
3693608023
@@ -340,6 +340,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (s->avctx->sample_rate <= 0) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "invalid sample rate\n");
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
s->num_channels = avctx->channels;
|
s->num_channels = avctx->channels;
|
||||||
|
|
||||||
if (s->num_channels < 0) {
|
if (s->num_channels < 0) {
|
||||||
|
Reference in New Issue
Block a user