diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-22 17:58:33 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-22 17:58:33 +0200 |
commit | 22793d7bb36e771dde1043d66f720ca7bacc7a1f (patch) | |
tree | 8b492e43015b2b2b0097523f9f5847c67117b183 /libavcodec/utils.c | |
parent | f9cf14c8da2a6af4ee8524ca950f644a0b081866 (diff) | |
download | ffmpeg-22793d7bb36e771dde1043d66f720ca7bacc7a1f.tar.gz |
ffmpeg/lavc: move experimental warnings to libavcodec.
This way they are available to all applications and not just ffmpeg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index bed15bc7d8..2ec28a729d 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -930,9 +930,16 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code if (avctx->codec->capabilities & CODEC_CAP_EXPERIMENTAL && avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) { - av_log(avctx, AV_LOG_ERROR, - "Codec %s is experimental but experimental codecs are not enabled, try -strict %d\n", - codec->name, FF_COMPLIANCE_EXPERIMENTAL); + const char *codec_string = av_codec_is_encoder(codec) ? "encoder" : "decoder"; + AVCodec *codec2; + av_log(NULL, AV_LOG_ERROR, + "%s '%s' is experimental but experimental codecs are not enabled, " + "Add '-strict %d' if you want to use it.\n", + codec_string, codec->name, FF_COMPLIANCE_EXPERIMENTAL); + codec2 = av_codec_is_encoder(codec) ? avcodec_find_encoder(codec->id) : avcodec_find_decoder(codec->id); + if (!(codec2->capabilities & CODEC_CAP_EXPERIMENTAL)) + av_log(NULL, AV_LOG_ERROR, "Or use the non experimental %s '%s'.\n", + codec_string, codec2->name); ret = AVERROR_EXPERIMENTAL; goto free_and_end; } |