History

avcodec/codec_internal: Add inlined version of av_codec_is_(de|en)coder

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.

Andreas Rheinhardt committed 1 year ago

Commit c8be3091 parent 47d7c6c6 files · +40 −20Browse files

Showing the changes to libavcodec/allcodecs.c (1 of 6 files). Show all

Unified · Split

libavcodec/allcodecs.c+4−4
@@ -1013,12 +1013,12 @@ static const AVCodec *find_codec(enum AVCodecID id, int (*x)(const AVCodec *)) · 1012 unmodified lines
10131013
10141014 const AVCodec *avcodec_find_encoder(enum AVCodecID id)
10151015 {
1016− return find_codec(id, av_codec_is_encoder);
1016+ return find_codec(id, ff_codec_is_encoder);
10171017 }
10181018
10191019 const AVCodec *avcodec_find_decoder(enum AVCodecID id)
10201020 {
1021− return find_codec(id, av_codec_is_decoder);
1021+ return find_codec(id, ff_codec_is_decoder);
10221022 }
10231023
10241024 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
10411041
10421042 const AVCodec *avcodec_find_encoder_by_name(const char *name)
10431043 {
1044− return find_codec_by_name(name, av_codec_is_encoder);
1044+ return find_codec_by_name(name, ff_codec_is_encoder);
10451045 }
10461046
10471047 const AVCodec *avcodec_find_decoder_by_name(const char *name)
10481048 {
1049− return find_codec_by_name(name, av_codec_is_decoder);
1049+ return find_codec_by_name(name, ff_codec_is_decoder);
10501050 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t