PR #23329 opened by mkver URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23329 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23329.patch
The list of codec descriptors is supposed to encompass all codec IDs; it certainly encompasses all codec IDs used by de/encoders (this is checked in the avcodec test program which is run via FATE). So the avcodec_find_decoder()/avcodec_find_encoder() are pointless. Signed-off-by: Andreas Rheinhardt <[email protected]> >From dcb1679088b08e3459044966bd7b07d96e7e6517 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt <[email protected]> Date: Thu, 4 Jun 2026 13:47:02 +0200 Subject: [PATCH] avcodec/utils: Don't attempt to derive CodecID name from de/encoders The list of codec descriptors is supposed to encompass all codec IDs; it certainly encompasses all codec IDs used by de/encoders (this is checked in the avcodec test program which is run via FATE). So the avcodec_find_decoder()/avcodec_find_encoder() are pointless. Signed-off-by: Andreas Rheinhardt <[email protected]> --- libavcodec/utils.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 615d60cd58..550d818572 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -406,20 +406,12 @@ int avpriv_codec_get_cap_skip_frame_fill_param(const AVCodec *codec){ const char *avcodec_get_name(enum AVCodecID id) { const AVCodecDescriptor *cd; - const AVCodec *codec; if (id == AV_CODEC_ID_NONE) return "none"; cd = avcodec_descriptor_get(id); if (cd) return cd->name; - av_log(NULL, AV_LOG_WARNING, "Codec 0x%x is not in the full list.\n", id); - codec = avcodec_find_decoder(id); - if (codec) - return codec->name; - codec = avcodec_find_encoder(id); - if (codec) - return codec->name; return "unknown_codec"; } -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
