mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 16:52:31 +00:00
Fail when lowres value is lower than 0
The attached patch fixes the crash which happens when user passes lowres value lower than 0 to FFplay. ffplay -lowres -1 test.mpg Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b49728df73
commit
7a54edaa16
@ -563,7 +563,7 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
|
||||
}
|
||||
}
|
||||
|
||||
if (avctx->codec->max_lowres < avctx->lowres) {
|
||||
if (avctx->codec->max_lowres < avctx->lowres || avctx->lowres < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "The maximum value for lowres supported by the decoder is %d\n",
|
||||
avctx->codec->max_lowres);
|
||||
ret = AVERROR(EINVAL);
|
||||
|
Loading…
Reference in New Issue
Block a user