Warn the user if lowres > max_lowres, set lowres to max_lowres and continue
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f42b3195d3
commit
125ea3ee06
@ -601,10 +601,9 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD
|
||||
}
|
||||
|
||||
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",
|
||||
av_log(avctx, AV_LOG_WARNING, "The maximum value for lowres supported by the decoder is %d\n",
|
||||
avctx->codec->max_lowres);
|
||||
ret = AVERROR(EINVAL);
|
||||
goto free_and_end;
|
||||
avctx->lowres = avctx->codec->max_lowres;
|
||||
}
|
||||
if (avctx->codec->encode) {
|
||||
int i;
|
||||
|
Loading…
x
Reference in New Issue
Block a user