Signed-off-by: Andreas Rheinhardt <[email protected]>
---
libavcodec/tests/codec_desc.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/libavcodec/tests/codec_desc.c b/libavcodec/tests/codec_desc.c
index c9b3497343..378e4c637f 100644
--- a/libavcodec/tests/codec_desc.c
+++ b/libavcodec/tests/codec_desc.c
@@ -16,11 +16,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavcodec/avcodec.h"
+#include "libavcodec/codec.h"
+#include "libavcodec/codec_desc.h"
int main(int argc, char **argv)
{
const AVCodecDescriptor *old_desc = NULL, *desc;
+ const AVCodec *codec;
+ void *iter = NULL;
while (desc = avcodec_descriptor_next(old_desc)) {
if (old_desc && old_desc->id >= desc->id) {
@@ -40,6 +43,13 @@ int main(int argc, char **argv)
old_desc = desc;
}
+ while (codec = av_codec_iterate(&iter)) {
+ if (!avcodec_descriptor_get(codec->id)) {
+ av_log(NULL, AV_LOG_FATAL, "Codec %s lacks a corresponding
descriptor\n",
+ codec->name);
+ return 1;
+ }
+ }
return 0;
}
--
2.30.2
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".