如何导出ffurl_register_protocol()?

如何导出ffurl_register_protocol()?,c,ffmpeg,libavformat,C,Ffmpeg,Libavformat,我有一些旧代码需要导出ffurl\u register\u protocol()。我找到了这个补丁: diff --git a/libavformat/Makefile b/libavformat/Makefile index 0d6cb91..802edd7 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -1,7 +1,7 @@ NAME = avformat FFLIBS = avcodec avutil

我有一些旧代码需要导出
ffurl\u register\u protocol()。我找到了这个补丁:

diff --git a/libavformat/Makefile b/libavformat/Makefile
index 0d6cb91..802edd7 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -1,7 +1,7 @@
 NAME = avformat
 FFLIBS = avcodec avutil
-HEADERS = avformat.h avio.h version.h
+HEADERS = avformat.h avio.h url.h version.h
 OBJS = allformats.o         \
        cutils.o             \
diff --git a/libavformat/libavformat.v b/libavformat/libavformat.v
index 6f11d60..e605135 100644
--- a/libavformat/libavformat.v
+++ b/libavformat/libavformat.v
@@ -1,4 +1,5 @@
 LIBAVFORMAT_$MAJOR {
                 global: av*;
+                ffurl_register_protocol;
           local: *;
 };
但是,这没有帮助。知道怎么做吗?

我想我知道了。 我添加了
int-av\u-ffurl\u-register\u协议(URLProtocol*协议,int-size)到libavformat/avformat.h。


我添加了实现:

int av_ffurl_register_protocol(URLProtocol *protocol, int size)
{
    return ffurl_register_protocol( protocol, size );
}
到libavformat/allformats.c


我仍然需要测试它。

修改libavformat/libavformat.v并添加要导出的API并重新编译ffmpeg源代码