Mercurial > libavcodec.hg
comparison utils.c @ 12108:c35d7bc64882 libavcodec
Add new decoder property max_lowres and do not init decoder if requested value is higher.
| author | cehoyos |
|---|---|
| date | Wed, 07 Jul 2010 21:23:36 +0000 |
| parents | e8a29b278ebf |
| children | cb3eb3a2fc96 |
comparison
equal
deleted
inserted
replaced
| 12107:1e4996a88ca5 | 12108:c35d7bc64882 |
|---|---|
| 504 av_log(avctx, AV_LOG_ERROR, "codec type or id mismatches\n"); | 504 av_log(avctx, AV_LOG_ERROR, "codec type or id mismatches\n"); |
| 505 goto free_and_end; | 505 goto free_and_end; |
| 506 } | 506 } |
| 507 avctx->frame_number = 0; | 507 avctx->frame_number = 0; |
| 508 if(avctx->codec->init){ | 508 if(avctx->codec->init){ |
| 509 if(avctx->codec_type == AVMEDIA_TYPE_VIDEO && | |
| 510 avctx->codec->max_lowres < avctx->lowres){ | |
| 511 av_log(avctx, AV_LOG_ERROR, "The maximum value for lowres supported by the decoder is %d\n", | |
| 512 avctx->codec->max_lowres); | |
| 513 goto free_and_end; | |
| 514 } | |
| 515 | |
| 509 ret = avctx->codec->init(avctx); | 516 ret = avctx->codec->init(avctx); |
| 510 if (ret < 0) { | 517 if (ret < 0) { |
| 511 goto free_and_end; | 518 goto free_and_end; |
| 512 } | 519 } |
| 513 } | 520 } |
