There is no record of this ever being used at all, anywhere, since the feature was added in 2effd274466. This gets rid of extra linker tricks just to support a feature that isn't used, simplifying portability to other platforms.
Unified · Split
| @@ -58,9 +58,6 @@ · 57 unmodified lines | |||
| 58 | #include <time.h> | 58 | #include <time.h> |
| 59 | #include <sys/wait.h> | 59 | #include <sys/wait.h> |
| 60 | #include <signal.h> | 60 | #include <signal.h> |
| 61 | #if HAVE_DLFCN_H | ||
| 62 | #include <dlfcn.h> | ||
| 63 | #endif | ||
| 64 | 61 | ||
| 65 | #include "cmdutils.h" | 62 | #include "cmdutils.h" |
| 66 | 63 | ||
| @@ -3914,32 +3911,6 @@ static enum AVCodecID opt_video_codec(const char *arg) · 3847 unmodified lines | |||
| 3914 | return p->id; | 3911 | return p->id; |
| 3915 | } | 3912 | } |
| 3916 | 3913 | ||
| 3917 | /* simplistic plugin support */ | ||
| 3918 | |||
| 3919 | #if HAVE_DLOPEN | ||
| 3920 | static void load_module(const char *filename) | ||
| 3921 | { | ||
| 3922 | void *dll; | ||
| 3923 | void (*init_func)(void); | ||
| 3924 | dll = dlopen(filename, RTLD_NOW); | ||
| 3925 | if (!dll) { | ||
| 3926 | fprintf(stderr, "Could not load module '%s' - %s\n", | ||
| 3927 | filename, dlerror()); | ||
| 3928 | return; | ||
| 3929 | } | ||
| 3930 | |||
| 3931 | init_func = dlsym(dll, "avserver_module_init"); | ||
| 3932 | if (!init_func) { | ||
| 3933 | fprintf(stderr, | ||
| 3934 | "%s: init function 'avserver_module_init()' not found\n", | ||
| 3935 | filename); | ||
| 3936 | dlclose(dll); | ||
| 3937 | } | ||
| 3938 | |||
| 3939 | init_func(); | ||
| 3940 | } | ||
| 3941 | #endif | ||
| 3942 | |||
| 3943 | static int avserver_opt_default(const char *opt, const char *arg, | 3914 | static int avserver_opt_default(const char *opt, const char *arg, |
| 3944 | AVCodecContext *avctx, int type) | 3915 | AVCodecContext *avctx, int type) |
| 3945 | { | 3916 | { |
| @@ -4596,12 +4567,7 @@ static int parse_ffconfig(const char *filename) · 650 unmodified lines | |||
| 4596 | redirect = NULL; | 4567 | redirect = NULL; |
| 4597 | } | 4568 | } |
| 4598 | } else if (!av_strcasecmp(cmd, "LoadModule")) { | 4569 | } else if (!av_strcasecmp(cmd, "LoadModule")) { |
| 4599 | get_arg(arg, sizeof(arg), &p); | 4570 | ERROR("Loadable modules no longer supported\n"); |
| 4600 | #if HAVE_DLOPEN | ||
| 4601 | load_module(arg); | ||
| 4602 | #else | ||
| 4603 | ERROR("Module support not compiled into this version: '%s'\n", arg); | ||
| 4604 | #endif | ||
| 4605 | } else { | 4571 | } else { |
| 4606 | ERROR("Incorrect keyword: '%s'\n", cmd); | 4572 | ERROR("Incorrect keyword: '%s'\n", cmd); |
| 4607 | } | 4573 | } |
| @@ -1974,7 +1974,6 @@ enable dxva2 vdpau · 1973 unmodified lines | |||
| 1974 | 1974 | ||
| 1975 | # build settings | 1975 | # build settings |
| 1976 | SHFLAGS='-shared -Wl,-soname,$$(@F)' | 1976 | SHFLAGS='-shared -Wl,-soname,$$(@F)' |
| 1977 | AVSERVERLDFLAGS=-Wl,-E | ||
| 1978 | LIBPREF="lib" | 1977 | LIBPREF="lib" |
| 1979 | LIBSUF=".a" | 1978 | LIBSUF=".a" |
| 1980 | FULLNAME='$(NAME)$(BUILDSUF)' | 1979 | FULLNAME='$(NAME)$(BUILDSUF)' |
| @@ -3059,7 +3058,6 @@ case $target_os in · 1078 unmodified lines | |||
| 3059 | host_libs= | 3058 | host_libs= |
| 3060 | ;; | 3059 | ;; |
| 3061 | sunos) | 3060 | sunos) |
| 3062 | AVSERVERLDFLAGS="" | ||
| 3063 | SHFLAGS='-shared -Wl,-h,$$(@F)' | 3061 | SHFLAGS='-shared -Wl,-h,$$(@F)' |
| 3064 | enabled x86 && SHFLAGS="-mimpure-text $SHFLAGS" | 3062 | enabled x86 && SHFLAGS="-mimpure-text $SHFLAGS" |
| 3065 | network_extralibs="-lsocket -lnsl" | 3063 | network_extralibs="-lsocket -lnsl" |
| @@ -3104,7 +3102,6 @@ case $target_os in · 38 unmodified lines | |||
| 3104 | SLIBSUF=".dylib" | 3102 | SLIBSUF=".dylib" |
| 3105 | SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)' | 3103 | SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)' |
| 3106 | SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)' | 3104 | SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)' |
| 3107 | AVSERVERLDFLAGS=-Wl,-bind_at_load | ||
| 3108 | objformat="macho" | 3105 | objformat="macho" |
| 3109 | enabled x86_64 && objformat="macho64" | 3106 | enabled x86_64 && objformat="macho64" |
| 3110 | enabled_any pic shared || | 3107 | enabled_any pic shared || |
| @@ -3196,7 +3193,6 @@ case $target_os in · 85 unmodified lines | |||
| 3196 | add_cppflags -D_GNU_SOURCE | 3193 | add_cppflags -D_GNU_SOURCE |
| 3197 | add_ldflags -Zomf -Zbin-files -Zargs-wild -Zmap | 3194 | add_ldflags -Zomf -Zbin-files -Zargs-wild -Zmap |
| 3198 | SHFLAGS='$(SUBDIR)$(NAME).def -Zdll -Zomf' | 3195 | SHFLAGS='$(SUBDIR)$(NAME).def -Zdll -Zomf' |
| 3199 | AVSERVERLDFLAGS="" | ||
| 3200 | LIBSUF="_s.a" | 3196 | LIBSUF="_s.a" |
| 3201 | SLIBPREF="" | 3197 | SLIBPREF="" |
| 3202 | SLIBSUF=".dll" | 3198 | SLIBSUF=".dll" |
| @@ -3236,7 +3232,6 @@ case $target_os in · 33 unmodified lines | |||
| 3236 | ;; | 3232 | ;; |
| 3237 | osf1) | 3233 | osf1) |
| 3238 | add_cppflags -D_OSF_SOURCE -D_POSIX_PII -D_REENTRANT | 3234 | add_cppflags -D_OSF_SOURCE -D_POSIX_PII -D_REENTRANT |
| 3239 | AVSERVERLDFLAGS= | ||
| 3240 | ;; | 3235 | ;; |
| 3241 | minix) | 3236 | minix) |
| 3242 | ;; | 3237 | ;; |
| @@ -4120,7 +4115,6 @@ LD_LIB=$LD_LIB · 877 unmodified lines | |||
| 4120 | LD_PATH=$LD_PATH | 4115 | LD_PATH=$LD_PATH |
| 4121 | DLLTOOL=$dlltool | 4116 | DLLTOOL=$dlltool |
| 4122 | LDFLAGS=$LDFLAGS | 4117 | LDFLAGS=$LDFLAGS |
| 4123 | LDFLAGS-avserver=$AVSERVERLDFLAGS | ||
| 4124 | SHFLAGS=$(echo $($ldflags_filter $SHFLAGS)) | 4118 | SHFLAGS=$(echo $($ldflags_filter $SHFLAGS)) |
| 4125 | YASMFLAGS=$YASMFLAGS | 4119 | YASMFLAGS=$YASMFLAGS |
| 4126 | BUILDSUF=$build_suffix | 4120 | BUILDSUF=$build_suffix |