Showing the changes to libavcodec/allcodecs.c (1 of 6 files). Show all
Unified · Split
| @@ -870,45 +870,6 @@ const AVCodec *av_codec_iterate(void **opaque) · 869 unmodified lines | ||
| 870 | 870 | return c; |
| 871 | 871 | } |
| 872 | 872 | |
| 873 | −#if FF_API_NEXT | |
| 874 | −FF_DISABLE_DEPRECATION_WARNINGS | |
| 875 | −static AVOnce av_codec_next_init = AV_ONCE_INIT; | |
| 876 | − | |
| 877 | −static void av_codec_init_next(void) | |
| 878 | −{ | |
| 879 | − AVCodec *prev = NULL, *p; | |
| 880 | − void *i = 0; | |
| 881 | − while ((p = (AVCodec*)av_codec_iterate(&i))) { | |
| 882 | − if (prev) | |
| 883 | − prev->next = p; | |
| 884 | − prev = p; | |
| 885 | − } | |
| 886 | −} | |
| 887 | − | |
| 888 | − | |
| 889 | − | |
| 890 | −av_cold void avcodec_register(AVCodec *codec) | |
| 891 | −{ | |
| 892 | − ff_thread_once(&av_codec_next_init, av_codec_init_next); | |
| 893 | −} | |
| 894 | − | |
| 895 | −AVCodec *av_codec_next(const AVCodec *c) | |
| 896 | −{ | |
| 897 | − ff_thread_once(&av_codec_next_init, av_codec_init_next); | |
| 898 | − | |
| 899 | − if (c) | |
| 900 | − return c->next; | |
| 901 | − else | |
| 902 | − return (AVCodec*)codec_list[0]; | |
| 903 | −} | |
| 904 | − | |
| 905 | −void avcodec_register_all(void) | |
| 906 | −{ | |
| 907 | − ff_thread_once(&av_codec_next_init, av_codec_init_next); | |
| 908 | −} | |
| 909 | −FF_ENABLE_DEPRECATION_WARNINGS | |
| 910 | −#endif | |
| 911 | − | |
| 912 | 873 | static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id) |
| 913 | 874 | { |
| 914 | 875 | switch(id){ |