Commit 125ea3ee authored by Jean First's avatar Jean First Committed by Michael Niedermayer

Warn the user if lowres > max_lowres, set lowres to max_lowres and continue

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f42b3195
...@@ -601,10 +601,9 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD ...@@ -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) { 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); avctx->codec->max_lowres);
ret = AVERROR(EINVAL); avctx->lowres = avctx->codec->max_lowres;
goto free_and_end;
} }
if (avctx->codec->encode) { if (avctx->codec->encode) {
int i; int i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment