mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/wmalosslessdec: Replace negative channel check by assert
It is already checked by common code in git/master Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
891bcc4acc
commit
9d6be83085
|
@ -189,11 +189,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avctx->channels < 0) {
|
av_assert0(avctx->channels >= 0);
|
||||||
av_log(avctx, AV_LOG_ERROR, "invalid number of channels %d\n",
|
if (avctx->channels > WMALL_MAX_CHANNELS) {
|
||||||
avctx->channels);
|
|
||||||
return AVERROR_INVALIDDATA;
|
|
||||||
} else if (avctx->channels > WMALL_MAX_CHANNELS) {
|
|
||||||
avpriv_request_sample(avctx,
|
avpriv_request_sample(avctx,
|
||||||
"More than %d channels", WMALL_MAX_CHANNELS);
|
"More than %d channels", WMALL_MAX_CHANNELS);
|
||||||
return AVERROR_PATCHWELCOME;
|
return AVERROR_PATCHWELCOME;
|
||||||
|
|
Loading…
Reference in New Issue