diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-08 03:19:31 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-08 03:33:58 +0100 |
commit | ac3c895d93a1bda738fd4576aec5c1cd0c0d8e1a (patch) | |
tree | 63847c1bdad80b27e1ce6e7d034d29846dd2cab6 /libavcodec/utils.c | |
parent | 0bd42ae72c0e88826b823d8106286d5abe2028e7 (diff) | |
download | ffmpeg-ac3c895d93a1bda738fd4576aec5c1cd0c0d8e1a.tar.gz |
Revert "Warn the user if lowres > max_lowres, set lowres to max_lowres and continue"
Changing the lowres value is risky because the user application may have a
local copy and not read back into it, or not undo some lowres dependant things.
A patch implementing this in ffplay is already on ffmpeg-dev, so this feature
should be back soon.
This reverts commit 125ea3ee06c4d71082bee3fc03c65d7c8c10d68c.
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 7e0a8cff48..bd9babc073 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -635,9 +635,10 @@ 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_WARNING, "The maximum value for lowres supported by the decoder is %d\n", + av_log(avctx, AV_LOG_ERROR, "The maximum value for lowres supported by the decoder is %d\n", avctx->codec->max_lowres); - avctx->lowres = avctx->codec->max_lowres; + ret = AVERROR(EINVAL); + goto free_and_end; } if (avctx->codec->encode) { int i; |