mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-14 19:31:24 +00:00
lavc: avcodec_open2(): pass context to av_log()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
dc11acdf2d
commit
b05d8d4cf4
@ -1130,13 +1130,13 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
|
|||||||
avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
|
avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
|
||||||
const char *codec_string = av_codec_is_encoder(codec) ? "encoder" : "decoder";
|
const char *codec_string = av_codec_is_encoder(codec) ? "encoder" : "decoder";
|
||||||
AVCodec *codec2;
|
AVCodec *codec2;
|
||||||
av_log(NULL, AV_LOG_ERROR,
|
av_log(avctx, AV_LOG_ERROR,
|
||||||
"The %s '%s' is experimental but experimental codecs are not enabled, "
|
"The %s '%s' is experimental but experimental codecs are not enabled, "
|
||||||
"add '-strict %d' if you want to use it.\n",
|
"add '-strict %d' if you want to use it.\n",
|
||||||
codec_string, codec->name, FF_COMPLIANCE_EXPERIMENTAL);
|
codec_string, codec->name, FF_COMPLIANCE_EXPERIMENTAL);
|
||||||
codec2 = av_codec_is_encoder(codec) ? avcodec_find_encoder(codec->id) : avcodec_find_decoder(codec->id);
|
codec2 = av_codec_is_encoder(codec) ? avcodec_find_encoder(codec->id) : avcodec_find_decoder(codec->id);
|
||||||
if (!(codec2->capabilities & CODEC_CAP_EXPERIMENTAL))
|
if (!(codec2->capabilities & CODEC_CAP_EXPERIMENTAL))
|
||||||
av_log(NULL, AV_LOG_ERROR, "Alternatively use the non experimental %s '%s'.\n",
|
av_log(avctx, AV_LOG_ERROR, "Alternatively use the non experimental %s '%s'.\n",
|
||||||
codec_string, codec2->name);
|
codec_string, codec2->name);
|
||||||
ret = AVERROR_EXPERIMENTAL;
|
ret = AVERROR_EXPERIMENTAL;
|
||||||
goto free_and_end;
|
goto free_and_end;
|
||||||
|
Loading…
Reference in New Issue
Block a user