mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 10:30:05 +01:00
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. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -1013,12 +1013,12 @@ static const AVCodec *find_codec(enum AVCodecID id, int (*x)(const AVCodec *))
|
||||
|
||||
const AVCodec *avcodec_find_encoder(enum AVCodecID id)
|
||||
{
|
||||
return find_codec(id, av_codec_is_encoder);
|
||||
return find_codec(id, ff_codec_is_encoder);
|
||||
}
|
||||
|
||||
const AVCodec *avcodec_find_decoder(enum AVCodecID id)
|
||||
{
|
||||
return find_codec(id, av_codec_is_decoder);
|
||||
return find_codec(id, ff_codec_is_decoder);
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
const AVCodec *avcodec_find_encoder_by_name(const char *name)
|
||||
{
|
||||
return find_codec_by_name(name, av_codec_is_encoder);
|
||||
return find_codec_by_name(name, ff_codec_is_encoder);
|
||||
}
|
||||
|
||||
const AVCodec *avcodec_find_decoder_by_name(const char *name)
|
||||
{
|
||||
return find_codec_by_name(name, av_codec_is_decoder);
|
||||
return find_codec_by_name(name, ff_codec_is_decoder);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user