Browse Source

Test lowres before codec init.

Originally committed as revision 25114 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/n0.8
Carl Eugen Hoyos 14 years ago
parent
commit
527c91e34a
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      libavcodec/utils.c

+ 6
- 6
libavcodec/utils.c View File

@@ -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;


Loading…
Cancel
Save