diff mbox series

[FFmpeg-devel,12/27] avformat/icoenc: Use avcodec_get_name() instead of codec descriptor

Message ID AM7PR03MB66600CB60462E1AF1292A5858FA39@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 63a5e83de8189372fcf8c543a01f1a0c28860ccb
Headers show
Series [FFmpeg-devel,01/27] avformat/astenc: Simplify writing padding | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 23, 2021, 3:28 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/icoenc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

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);
     }