diff options
author | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2010-09-13 22:03:29 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2010-09-13 22:03:29 +0000 |
commit | 527c91e34a0e1b49dbaede9fa1a7cc81ef8a3b0a (patch) | |
tree | b4ce61023dad01a318abc4910555bd1513a39093 /libavcodec | |
parent | 40b433b62b07bab92873a2e774fb856d6e7e7140 (diff) | |
download | ffmpeg-527c91e34a0e1b49dbaede9fa1a7cc81ef8a3b0a.tar.gz |
Test lowres before codec init.
Originally committed as revision 25114 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/utils.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 442b9efe27..e12b677a93 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -504,13 +504,13 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec) goto free_and_end; } avctx->frame_number = 0; - if(avctx->codec->init){ - if (avctx->codec->max_lowres < avctx->lowres) { - av_log(avctx, AV_LOG_ERROR, "The maximum value for lowres supported by the decoder is %d\n", - avctx->codec->max_lowres); - goto free_and_end; - } + if (avctx->codec->max_lowres < avctx->lowres) { + av_log(avctx, AV_LOG_ERROR, "The maximum value for lowres supported by the decoder is %d\n", + avctx->codec->max_lowres); + goto free_and_end; + } + if(avctx->codec->init){ ret = avctx->codec->init(avctx); if (ret < 0) { goto free_and_end; |