| @@ -112,12 +112,12 @@ static void avcodec_init(void) · 111 unmodified lines |
| 112 | ff_dsputil_static_init(); | 112 | ff_dsputil_static_init(); |
| 113 | } | 113 | } |
| 114 | | 114 | |
| 115 | static av_always_inline int codec_is_encoder(AVCodec *codec) | 115 | int av_codec_is_encoder(AVCodec *codec) |
| 116 | { | 116 | { |
| 117 | return codec && (codec->encode || codec->encode2); | 117 | return codec && (codec->encode || codec->encode2); |
| 118 | } | 118 | } |
| 119 | | 119 | |
| 120 | static av_always_inline int codec_is_decoder(AVCodec *codec) | 120 | int av_codec_is_decoder(AVCodec *codec) |
| 121 | { | 121 | { |
| 122 | return codec && codec->decode; | 122 | return codec && codec->decode; |
| 123 | } | 123 | } |
| @@ -704,7 +704,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD · 580 unmodified lines |
| 704 | | 704 | |
| 705 | /* if the decoder init function was already called previously, | 705 | /* if the decoder init function was already called previously, |
| 706 | free the already allocated subtitle_header before overwriting it */ | 706 | free the already allocated subtitle_header before overwriting it */ |
| 707 | if (codec_is_decoder(codec)) | 707 | if (av_codec_is_decoder(codec)) |
| 708 | av_freep(&avctx->subtitle_header); | 708 | av_freep(&avctx->subtitle_header); |
| 709 | | 709 | |
| 710 | #define SANE_NB_CHANNELS 128U | 710 | #define SANE_NB_CHANNELS 128U |
| @@ -748,7 +748,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD · 37 unmodified lines |
| 748 | ret = AVERROR(EINVAL); | 748 | ret = AVERROR(EINVAL); |
| 749 | goto free_and_end; | 749 | goto free_and_end; |
| 750 | } | 750 | } |
| 751 | if (codec_is_encoder(avctx->codec)) { | 751 | if (av_codec_is_encoder(avctx->codec)) { |
| 752 | int i; | 752 | int i; |
| 753 | if (avctx->codec->sample_fmts) { | 753 | if (avctx->codec->sample_fmts) { |
| 754 | for (i = 0; avctx->codec->sample_fmts[i] != AV_SAMPLE_FMT_NONE; i++) | 754 | for (i = 0; avctx->codec->sample_fmts[i] != AV_SAMPLE_FMT_NONE; i++) |
| @@ -1367,7 +1367,7 @@ av_cold int avcodec_close(AVCodecContext *avctx) · 612 unmodified lines |
| 1367 | av_opt_free(avctx->priv_data); | 1367 | av_opt_free(avctx->priv_data); |
| 1368 | av_opt_free(avctx); | 1368 | av_opt_free(avctx); |
| 1369 | av_freep(&avctx->priv_data); | 1369 | av_freep(&avctx->priv_data); |
| 1370 | if (codec_is_encoder(avctx->codec)) | 1370 | if (av_codec_is_encoder(avctx->codec)) |
| 1371 | av_freep(&avctx->extradata); | 1371 | av_freep(&avctx->extradata); |
| 1372 | avctx->codec = NULL; | 1372 | avctx->codec = NULL; |
| 1373 | avctx->active_thread_type = 0; | 1373 | avctx->active_thread_type = 0; |
| @@ -1385,7 +1385,7 @@ AVCodec *avcodec_find_encoder(enum CodecID id) · 11 unmodified lines |
| 1385 | AVCodec *p, *experimental=NULL; | 1385 | AVCodec *p, *experimental=NULL; |
| 1386 | p = first_avcodec; | 1386 | p = first_avcodec; |
| 1387 | while (p) { | 1387 | while (p) { |
| 1388 | if (codec_is_encoder(p) && p->id == id) { | 1388 | if (av_codec_is_encoder(p) && p->id == id) { |
| 1389 | if (p->capabilities & CODEC_CAP_EXPERIMENTAL && !experimental) { | 1389 | if (p->capabilities & CODEC_CAP_EXPERIMENTAL && !experimental) { |
| 1390 | experimental = p; | 1390 | experimental = p; |
| 1391 | } else | 1391 | } else |
| @@ -1403,7 +1403,7 @@ AVCodec *avcodec_find_encoder_by_name(const char *name) · 11 unmodified lines |
| 1403 | return NULL; | 1403 | return NULL; |
| 1404 | p = first_avcodec; | 1404 | p = first_avcodec; |
| 1405 | while (p) { | 1405 | while (p) { |
| 1406 | if (codec_is_encoder(p) && strcmp(name,p->name) == 0) | 1406 | if (av_codec_is_encoder(p) && strcmp(name,p->name) == 0) |
| 1407 | return p; | 1407 | return p; |
| 1408 | p = p->next; | 1408 | p = p->next; |
| 1409 | } | 1409 | } |
| @@ -1415,7 +1415,7 @@ AVCodec *avcodec_find_decoder(enum CodecID id) · 5 unmodified lines |
| 1415 | AVCodec *p; | 1415 | AVCodec *p; |
| 1416 | p = first_avcodec; | 1416 | p = first_avcodec; |
| 1417 | while (p) { | 1417 | while (p) { |
| 1418 | if (codec_is_decoder(p) && p->id == id) | 1418 | if (av_codec_is_decoder(p) && p->id == id) |
| 1419 | return p; | 1419 | return p; |
| 1420 | p = p->next; | 1420 | p = p->next; |
| 1421 | } | 1421 | } |
| @@ -1429,7 +1429,7 @@ AVCodec *avcodec_find_decoder_by_name(const char *name) · 7 unmodified lines |
| 1429 | return NULL; | 1429 | return NULL; |
| 1430 | p = first_avcodec; | 1430 | p = first_avcodec; |
| 1431 | while (p) { | 1431 | while (p) { |
| 1432 | if (codec_is_decoder(p) && strcmp(name,p->name) == 0) | 1432 | if (av_codec_is_decoder(p) && strcmp(name,p->name) == 0) |
| 1433 | return p; | 1433 | return p; |
| 1434 | p = p->next; | 1434 | p = p->next; |
| 1435 | } | 1435 | } |