MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / find_codec

Function find_codec

libavcodec/allcodecs.c:1020–1041  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1018}
1019
1020static const AVCodec *find_codec(enum AVCodecID id, int (*x)(const AVCodec *))
1021{
1022 const AVCodec *p, *experimental = NULL;
1023 av_unused const AVCodecDescriptor *desc = avcodec_descriptor_get(id);
1024 void *i = 0;
1025
1026 id = remap_deprecated_codec_id(id);
1027
1028 while ((p = av_codec_iterate(&i))) {
1029 if (!x(p))
1030 continue;
1031 if (p->id == id) {
1032 av_assert1(!desc || !(desc->props & AV_CODEC_PROP_ENHANCEMENT));
1033 if (p->capabilities & AV_CODEC_CAP_EXPERIMENTAL && !experimental) {
1034 experimental = p;
1035 } else
1036 return p;
1037 }
1038 }
1039
1040 return experimental;
1041}
1042
1043const AVCodec *avcodec_find_encoder(enum AVCodecID id)
1044{

Callers 2

avcodec_find_encoderFunction · 0.70
avcodec_find_decoderFunction · 0.70

Calls 3

avcodec_descriptor_getFunction · 0.85
av_codec_iterateFunction · 0.85

Tested by

no test coverage detected