From d6bd29492ca2f0571580d2601386cc2e1dd37250 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 27 Aug 2014 22:37:38 +0200 Subject: [PATCH] avformat/icoenc: Remove deprecated use of codec_name Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer --- libavformat/icoenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/icoenc.c b/libavformat/icoenc.c index dcf906513a..53d4420f37 100644 --- a/libavformat/icoenc.c +++ b/libavformat/icoenc.c @@ -61,7 +61,8 @@ static int ico_check_attributes(AVFormatContext *s, const AVCodecContext *c) return AVERROR(EINVAL); } } else { - av_log(s, AV_LOG_ERROR, "Unsupported codec %s\n", c->codec_name); + const AVCodecDescriptor *codesc = avcodec_descriptor_get(c->codec_id); + av_log(s, AV_LOG_ERROR, "Unsupported codec %s\n", codesc ? codesc->name : ""); return AVERROR(EINVAL); }