These functions check whether the AVCodec* is NULL, but this has already been checked at a lot of places in our codebase, so that it boils down to checking the is_decoder flag.
Showing the changes to libavcodec/allcodecs.c (1 of 6 files). Show all
Unified · Split
| @@ -1013,12 +1013,12 @@ static const AVCodec *find_codec(enum AVCodecID id, int (*x)(const AVCodec *)) · 1012 unmodified lines | ||
| 1013 | 1013 | |
| 1014 | 1014 | const AVCodec *avcodec_find_encoder(enum AVCodecID id) |
| 1015 | 1015 | { |
| 1016 | − return find_codec(id, av_codec_is_encoder); | |
| 1016 | + return find_codec(id, ff_codec_is_encoder); | |
| 1017 | 1017 | } |
| 1018 | 1018 | |
| 1019 | 1019 | const AVCodec *avcodec_find_decoder(enum AVCodecID id) |
| 1020 | 1020 | { |
| 1021 | − return find_codec(id, av_codec_is_decoder); | |
| 1021 | + return find_codec(id, ff_codec_is_decoder); | |
| 1022 | 1022 | } |
| 1023 | 1023 | |
| 1024 | 1024 | static const AVCodec *find_codec_by_name(const char *name, int (*x)(const AVCodec *)) |
| @@ -1041,10 +1041,10 @@ static const AVCodec *find_codec_by_name(const char *name, int (*x)(const AVCode · 16 unmodified lines | ||
| 1041 | 1041 | |
| 1042 | 1042 | const AVCodec *avcodec_find_encoder_by_name(const char *name) |
| 1043 | 1043 | { |
| 1044 | − return find_codec_by_name(name, av_codec_is_encoder); | |
| 1044 | + return find_codec_by_name(name, ff_codec_is_encoder); | |
| 1045 | 1045 | } |
| 1046 | 1046 | |
| 1047 | 1047 | const AVCodec *avcodec_find_decoder_by_name(const char *name) |
| 1048 | 1048 | { |
| 1049 | − return find_codec_by_name(name, av_codec_is_decoder); | |
| 1049 | + return find_codec_by_name(name, ff_codec_is_decoder); | |
| 1050 | 1050 | } |