Skip to content

Commit

Permalink
avfilter: Make avpriv_open a library-internal function on msvcrt
Browse files Browse the repository at this point in the history
This applies the same change for libavfilter as commit
e743e7a did for the other libraries.

Original commit message:

Add one copy of the function into each of the libraries, similarly
to what we do for log2_tab. When using static libs, only one
copy of the file_open.o object file gets included, while when
using shared libraries, each of them get a copy of its own.

This fixes DLL builds with a statically linked C runtime, where
each DLL effectively has got its own instance of the C runtime,
where file descriptors can't be shared across runtimes.

On systems not using msvcrt, the function is not duplicated.

Based-on-patch-by: Martin Storsjö <martin@martin.st>
Signed-off-by: softworkz <softworkz@hotmail.com>
  • Loading branch information
softworkz committed May 19, 2022
1 parent 94d023e commit 5e50103
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions libavfilter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ OBJS = allfilters.o \
version.o \
video.o \

OBJS-$(HAVE_LIBC_MSVCRT) += file_open.o
OBJS-$(HAVE_THREADS) += pthread.o

# subsystems
Expand Down
1 change: 1 addition & 0 deletions libavfilter/file_open.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "libavutil/file_open.c"

0 comments on commit 5e50103

Please sign in to comment.