PR #23465 opened by mkver URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23465 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23465.patch
>From 171ba0bf7d93e5eaf50905631bcaff7502bb3c27 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt <[email protected]> Date: Fri, 12 Jun 2026 15:01:41 +0200 Subject: [PATCH] avcodec/allcodecs: Move AV_CODEC_PROP_ENHANCEMENT check to test tool Signed-off-by: Andreas Rheinhardt <[email protected]> --- libavcodec/allcodecs.c | 4 ---- libavcodec/tests/avcodec.c | 13 +++++++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 0815d46f79..314cb230a4 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -28,13 +28,11 @@ #include <string.h> #include "config.h" -#include "libavutil/avassert.h" #include "libavutil/thread.h" #include "avcodec.h" #include "codec.h" #include "codec_id.h" #include "codec_internal.h" -#include "codec_desc.h" extern const FFCodec ff_a64multi_encoder; extern const FFCodec ff_a64multi5_encoder; @@ -1021,7 +1019,6 @@ static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id) static const AVCodec *find_codec(enum AVCodecID id, int (*x)(const AVCodec *)) { const AVCodec *p, *experimental = NULL; - av_unused const AVCodecDescriptor *desc = avcodec_descriptor_get(id); void *i = 0; id = remap_deprecated_codec_id(id); @@ -1030,7 +1027,6 @@ static const AVCodec *find_codec(enum AVCodecID id, int (*x)(const AVCodec *)) if (!x(p)) continue; if (p->id == id) { - av_assert1(!desc || !(desc->props & AV_CODEC_PROP_ENHANCEMENT)); if (p->capabilities & AV_CODEC_CAP_EXPERIMENTAL && !experimental) { experimental = p; } else diff --git a/libavcodec/tests/avcodec.c b/libavcodec/tests/avcodec.c index 893175c285..ea7e1bada5 100644 --- a/libavcodec/tests/avcodec.c +++ b/libavcodec/tests/avcodec.c @@ -235,10 +235,15 @@ FF_ENABLE_DEPRECATION_WARNINGS codec2->priv_data_size); if (!(desc = avcodec_descriptor_get(codec->id))) { ERR("Codec %s lacks a corresponding descriptor\n"); - } else if (desc->type != codec->type) - ERR_EXT("The type of AVCodec %s and its AVCodecDescriptor differ: " - "%s vs %s\n", - get_type_string(codec->type), get_type_string(desc->type)); + } else { + if (desc->type != codec->type) + ERR_EXT("The type of AVCodec %s and its AVCodecDescriptor %s " + "differ: %s vs %s\n", + desc->name, get_type_string(codec->type), get_type_string(desc->type)); + if (desc->props & AV_CODEC_PROP_ENHANCEMENT) + ERR_EXT("Codec descriptor for codec %s (descriptor name %s) has " + "AV_CODEC_PROP_ENHANCEMENT flag set.\n", desc->name); + } } return ret; } -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
