[FFmpeg-devel] [PATCH] avformat/file: Fix duplicate symbol ff_jni_*
Zhao Zhili
quinkblack at foxmail.com
Sun Mar 24 04:44:23 EET 2024
From: Zhao Zhili <zhilizhao at tencent.com>
---
libavformat/Makefile | 1 +
libavformat/ffjni.c | 1 +
libavformat/file.c | 3 +--
3 files changed, 3 insertions(+), 2 deletions(-)
create mode 100644 libavformat/ffjni.c
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 44aa485029..e10ad436a8 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -724,6 +724,7 @@ OBJS-$(CONFIG_LIBZMQ_PROTOCOL) += libzmq.o
# Objects duplicated from other libraries for shared builds
SHLIBOBJS += log2_tab.o to_upper4.o
+SHLIBOBJS-$(CONFIG_ANDROID_CONTENT_PROTOCOL) += ffjni.o
SHLIBOBJS-$(CONFIG_ISO_MEDIA) += mpegaudiotabs.o
SHLIBOBJS-$(CONFIG_FLV_MUXER) += mpeg4audio_sample_rates.o
SHLIBOBJS-$(CONFIG_HLS_DEMUXER) += ac3_channel_layout_tab.o
diff --git a/libavformat/ffjni.c b/libavformat/ffjni.c
new file mode 100644
index 0000000000..a5285564b2
--- /dev/null
+++ b/libavformat/ffjni.c
@@ -0,0 +1 @@
+#include "libavcodec/ffjni.c"
diff --git a/libavformat/file.c b/libavformat/file.c
index dd5819c06f..f80cb4b37a 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -41,9 +41,8 @@
#include "os_support.h"
#include "url.h"
#if CONFIG_ANDROID_CONTENT_PROTOCOL
-#include <jni.h>
+#include "libavcodec/ffjni.h"
#include "libavcodec/jni.h"
-#include "libavcodec/ffjni.c"
#endif
--
2.34.1
More information about the ffmpeg-devel
mailing list