diff options
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 47e29c9151..6c49905e65 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -118,12 +118,12 @@ static void avcodec_init(void) ff_dsputil_static_init(); } -static av_always_inline int codec_is_encoder(AVCodec *codec) +int av_codec_is_encoder(AVCodec *codec) { return codec && (codec->encode || codec->encode2); } -static av_always_inline int codec_is_decoder(AVCodec *codec) +int av_codec_is_decoder(AVCodec *codec) { return codec && codec->decode; } @@ -798,7 +798,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD /* if the decoder init function was already called previously, free the already allocated subtitle_header before overwriting it */ - if (codec_is_decoder(codec)) + if (av_codec_is_decoder(codec)) av_freep(&avctx->subtitle_header); #define SANE_NB_CHANNELS 128U @@ -845,7 +845,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD ret = AVERROR(EINVAL); goto free_and_end; } - if (codec_is_encoder(avctx->codec)) { + if (av_codec_is_encoder(avctx->codec)) { int i; if (avctx->codec->sample_fmts) { for (i = 0; avctx->codec->sample_fmts[i] != AV_SAMPLE_FMT_NONE; i++) @@ -914,7 +914,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD } } - if (codec_is_decoder(avctx->codec) && !avctx->bit_rate) + if (av_codec_is_decoder(avctx->codec) && !avctx->bit_rate) avctx->bit_rate = get_bit_rate(avctx); ret=0; @@ -1527,7 +1527,7 @@ av_cold int avcodec_close(AVCodecContext *avctx) av_opt_free(avctx->priv_data); av_opt_free(avctx); av_freep(&avctx->priv_data); - if (codec_is_encoder(avctx->codec)) + if (av_codec_is_encoder(avctx->codec)) av_freep(&avctx->extradata); avctx->codec = NULL; avctx->active_thread_type = 0; @@ -1556,7 +1556,7 @@ AVCodec *avcodec_find_encoder(enum CodecID id) p = first_avcodec; id= remap_deprecated_codec_id(id); while (p) { - if (codec_is_encoder(p) && p->id == id) { + if (av_codec_is_encoder(p) && p->id == id) { if (p->capabilities & CODEC_CAP_EXPERIMENTAL && !experimental) { experimental = p; } else @@ -1574,7 +1574,7 @@ AVCodec *avcodec_find_encoder_by_name(const char *name) return NULL; p = first_avcodec; while (p) { - if (codec_is_encoder(p) && strcmp(name,p->name) == 0) + if (av_codec_is_encoder(p) && strcmp(name,p->name) == 0) return p; p = p->next; } @@ -1587,7 +1587,7 @@ AVCodec *avcodec_find_decoder(enum CodecID id) p = first_avcodec; id= remap_deprecated_codec_id(id); while (p) { - if (codec_is_decoder(p) && p->id == id) { + if (av_codec_is_decoder(p) && p->id == id) { if (p->capabilities & CODEC_CAP_EXPERIMENTAL && !experimental) { experimental = p; } else @@ -1605,7 +1605,7 @@ AVCodec *avcodec_find_decoder_by_name(const char *name) return NULL; p = first_avcodec; while (p) { - if (codec_is_decoder(p) && strcmp(name,p->name) == 0) + if (av_codec_is_decoder(p) && strcmp(name,p->name) == 0) return p; p = p->next; } |