[FFmpeg-cvslog] avformat/icoenc: Use avcodec_get_name() instead of codec descriptor

Andreas Rheinhardt git at videolan.org
Mon Sep 27 08:19:11 EEST 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed Sep 22 22:36:23 2021 +0200| [63a5e83de8189372fcf8c543a01f1a0c28860ccb] | committer: Andreas Rheinhardt

avformat/icoenc: Use avcodec_get_name() instead of codec descriptor

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=63a5e83de8189372fcf8c543a01f1a0c28860ccb
---

 libavformat/icoenc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavformat/icoenc.c b/libavformat/icoenc.c
index 21966f3921..d684f67707 100644
--- a/libavformat/icoenc.c
+++ b/libavformat/icoenc.c
@@ -27,7 +27,6 @@
 #include "libavutil/intreadwrite.h"
 #include "libavutil/pixdesc.h"
 
-#include "libavcodec/codec_desc.h"
 #include "libavcodec/codec_id.h"
 
 #include "avformat.h"
@@ -66,8 +65,7 @@ static int ico_check_attributes(AVFormatContext *s, const AVCodecParameters *p)
             return AVERROR(EINVAL);
         }
     } else {
-        const AVCodecDescriptor *codesc = avcodec_descriptor_get(p->codec_id);
-        av_log(s, AV_LOG_ERROR, "Unsupported codec %s\n", codesc ? codesc->name : "");
+        av_log(s, AV_LOG_ERROR, "Unsupported codec %s\n", avcodec_get_name(p->codec_id));
         return AVERROR(EINVAL);
     }
 



More information about the ffmpeg-cvslog mailing list