diff options
author | Jean First <jeanfirst@gmail.com> | 2011-09-30 11:42:43 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-30 15:30:35 +0200 |
commit | 125ea3ee06c4d71082bee3fc03c65d7c8c10d68c (patch) | |
tree | baef8250309835bc9f2deda5ffdfb0b4e4d7c4b5 /libavcodec | |
parent | f42b3195d3f2692a4dfc0a8668bb4ac35301f2ed (diff) | |
download | ffmpeg-125ea3ee06c4d71082bee3fc03c65d7c8c10d68c.tar.gz |
Warn the user if lowres > max_lowres, set lowres to max_lowres and continue
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/utils.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 95fb65ad43..0ac81ba333 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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; |