Skip to content

Commit 48e3b2c

Browse files
committed
update patches
1 parent c6e9ba7 commit 48e3b2c

File tree

3 files changed

+34
-47
lines changed

3 files changed

+34
-47
lines changed

configs/ffconfig/auto-detect-third-libs.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ echo "----------------------"
244244

245245
echo "[✅] --enable-parser=av3a"
246246
THIRD_CFG_FLAGS="$THIRD_CFG_FLAGS --enable-parser=av3a --enable-demuxer=av3a"
247-
echo "----------------------"
248247

249248
# --------------------------------------------------------------
250249
THIRD_CFG_FLAGS="$THIRD_CFG_FLAGS --pkg-config-flags=--static"

patches/ffmpeg-n7.1.1/0006-restore-ijk-custom-protocols-except-long-url.patch renamed to patches/ffmpeg-n7.1.1/0006-restore-ijk-custom-protocols-and-demuxers-except-lon.patch

Lines changed: 23 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
From fc20f37d242895412029521935804a96d9d0bf0c Mon Sep 17 00:00:00 2001
1+
From a8dc36d3060372153fe0cc93b2a9af3a50271aba Mon Sep 17 00:00:00 2001
22
From: qianlongxu <qianlongxu@gmail.com>
3-
Date: Thu, 29 May 2025 10:57:48 +0800
4-
Subject: [PATCH] restore ijk custom protocols except long url
3+
Date: Fri, 30 May 2025 09:15:11 +0800
4+
Subject: [PATCH] restore ijk custom protocols and demuxers except long url and
5+
async
56

67
---
78
libavcodec/Makefile | 1 +
8-
libavformat/Makefile | 9 ++++
9+
libavformat/Makefile | 10 ++++
910
libavformat/allformats.c | 4 ++
10-
libavformat/async.c | 2 +-
1111
libavformat/demux.c | 13 +++++
1212
libavformat/demux.h | 2 +
13-
libavformat/ijkutils.c | 101 +++++++++++++++++++++++++++++++++++++++
13+
libavformat/ijkutils.c | 102 +++++++++++++++++++++++++++++++++++++++
1414
libavformat/protocols.c | 6 +++
1515
libavutil/Makefile | 1 +
16-
9 files changed, 138 insertions(+), 1 deletion(-)
16+
8 files changed, 139 insertions(+)
1717
create mode 100644 libavformat/ijkutils.c
1818

1919
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
@@ -29,13 +29,14 @@ index a4fcce3..ed5c705 100644
2929
OBJS = ac3_parser.o \
3030
adts_parser.o \
3131
diff --git a/libavformat/Makefile b/libavformat/Makefile
32-
index e5934e9..359781b 100644
32+
index e5934e9..5e88060 100644
3333
--- a/libavformat/Makefile
3434
+++ b/libavformat/Makefile
35-
@@ -7,6 +7,14 @@ HEADERS = avformat.h \
35+
@@ -7,6 +7,15 @@ HEADERS = avformat.h \
3636
version_major.h \
3737
application.h \
3838
dns_cache.h \
39+
+ demux.h \
3940
+ avc.h \
4041
+ url.h \
4142
+ internal.h \
@@ -47,7 +48,7 @@ index e5934e9..359781b 100644
4748

4849
OBJS = allformats.o \
4950
avformat.o \
50-
@@ -34,6 +42,7 @@ OBJS = allformats.o \
51+
@@ -34,6 +43,7 @@ OBJS = allformats.o \
5152
version.o \
5253
application.o \
5354
dns_cache.o \
@@ -70,19 +71,6 @@ index 305fa46..063be70 100644
7071
#include "libavformat/muxer_list.c"
7172
#include "libavformat/demuxer_list.c"
7273

73-
diff --git a/libavformat/async.c b/libavformat/async.c
74-
index e0329e2..e5ee519 100644
75-
--- a/libavformat/async.c
76-
+++ b/libavformat/async.c
77-
@@ -489,7 +489,7 @@ static const AVClass async_context_class = {
78-
.version = LIBAVUTIL_VERSION_INT,
79-
};
80-
81-
-const URLProtocol ff_async_protocol = {
82-
+URLProtocol ff_async_protocol = {
83-
.name = "async",
84-
.url_open2 = async_open,
85-
.url_read = async_read,
8674
diff --git a/libavformat/demux.c b/libavformat/demux.c
8775
index 4fd22c4..ff62292 100644
8876
--- a/libavformat/demux.c
@@ -143,10 +131,10 @@ index 9c76095..8b0af4c 100644
143131
* set. 'avformat_new_stream' can be called only if the flag
144132
diff --git a/libavformat/ijkutils.c b/libavformat/ijkutils.c
145133
new file mode 100644
146-
index 0000000..107b238
134+
index 0000000..42cc77c
147135
--- /dev/null
148136
+++ b/libavformat/ijkutils.c
149-
@@ -0,0 +1,101 @@
137+
@@ -0,0 +1,102 @@
150138
+/*
151139
+ * utils.c
152140
+ *
@@ -172,7 +160,7 @@ index 0000000..107b238
172160
+
173161
+#include <stdlib.h>
174162
+#include "url.h"
175-
+#include "avformat.h"
163+
+#include "demux.h"
176164
+
177165
+
178166
+#define IJK_FF_PROTOCOL(x) \
@@ -208,19 +196,18 @@ index 0000000..107b238
208196
+ return -1;
209197
+}
210198
+
211-
+IJK_FF_PROTOCOL(async);
212199
+IJK_DUMMY_PROTOCOL(ijkmediadatasource);
213200
+IJK_DUMMY_PROTOCOL(ijkhttphook);
214201
+IJK_DUMMY_PROTOCOL(ijksegment);
215202
+IJK_DUMMY_PROTOCOL(ijktcphook);
216203
+IJK_DUMMY_PROTOCOL(ijkio);
217204
+
218205
+#define IJK_FF_DEMUXER(x) \
219-
+extern AVInputFormat ff_##x##_demuxer; \
220-
+int ijkav_register_##x##_demuxer(AVInputFormat *demuxer, int demuxer_size); \
221-
+int ijkav_register_##x##_demuxer(AVInputFormat *demuxer, int demuxer_size) \
206+
+extern FFInputFormat ff_##x##_demuxer; \
207+
+int ijkav_register_##x##_demuxer(FFInputFormat *demuxer, int demuxer_size); \
208+
+int ijkav_register_##x##_demuxer(FFInputFormat *demuxer, int demuxer_size) \
222209
+{ \
223-
+ if (demuxer_size != sizeof(AVInputFormat)) { \
210+
+ if (demuxer_size != sizeof(FFInputFormat)) { \
224211
+ av_log(NULL, AV_LOG_ERROR, "ijkav_register_##x##_demuxer: ABI mismatch.\n"); \
225212
+ return -1; \
226213
+ } \
@@ -236,9 +223,11 @@ index 0000000..107b238
236223
+ .version = LIBAVUTIL_VERSION_INT, \
237224
+ }; \
238225
+ \
239-
+AVInputFormat ff_##x##_demuxer = { \
240-
+ .name = #x, \
241-
+ .priv_class = &ijk_##x##_demuxer_class, \
226+
+FFInputFormat ff_##x##_demuxer = { \
227+
+ .p.name = #x, \
228+
+ .p.priv_class = &ijk_##x##_demuxer_class, \
229+
+ .priv_data_size = 1, \
230+
+ .flags_internal = FF_INFMT_FLAG_INIT_CLEANUP, \
242231
+};
243232
+
244233
+/*
Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
From d49f164f790a3ed23e9701fa72e5720535bec901 Mon Sep 17 00:00:00 2001
1+
From 8fe7e70aa2feb98f199e1d3c91afb435f6db25aa Mon Sep 17 00:00:00 2001
22
From: qianlongxu <qianlongxu@gmail.com>
3-
Date: Wed, 28 May 2025 18:23:51 +0800
3+
Date: Fri, 30 May 2025 09:24:42 +0800
44
Subject: [PATCH] add 3 dummy ijkhttp protocols
55

66
---
77
libavformat/ijkutils.c | 3 +++
8-
libavformat/protocols.c | 4 ++++
9-
2 files changed, 7 insertions(+)
8+
libavformat/protocols.c | 3 +++
9+
2 files changed, 6 insertions(+)
1010

1111
diff --git a/libavformat/ijkutils.c b/libavformat/ijkutils.c
12-
index 5999101..18b81af 100644
12+
index 604e725..2f36c69 100644
1313
--- a/libavformat/ijkutils.c
1414
+++ b/libavformat/ijkutils.c
15-
@@ -65,6 +65,9 @@ IJK_DUMMY_PROTOCOL(ijkhttphook);
15+
@@ -64,6 +64,9 @@ IJK_DUMMY_PROTOCOL(ijkhttphook);
1616
IJK_DUMMY_PROTOCOL(ijksegment);
1717
IJK_DUMMY_PROTOCOL(ijktcphook);
1818
IJK_DUMMY_PROTOCOL(ijkio);
@@ -21,22 +21,21 @@ index 5999101..18b81af 100644
2121
+IJK_DUMMY_PROTOCOL(ijkhttp3);
2222

2323
#define IJK_FF_DEMUXER(x) \
24-
extern AVInputFormat ff_##x##_demuxer; \
24+
extern FFInputFormat ff_##x##_demuxer; \
2525
diff --git a/libavformat/protocols.c b/libavformat/protocols.c
26-
index 719caf8..f5eb0db 100644
26+
index 719caf8..b291b9f 100644
2727
--- a/libavformat/protocols.c
2828
+++ b/libavformat/protocols.c
29-
@@ -85,6 +85,10 @@ extern const URLProtocol ff_ijksegment_protocol;
29+
@@ -84,6 +84,9 @@ extern const URLProtocol ff_ijkmediadatasource_protocol;
30+
extern const URLProtocol ff_ijksegment_protocol;
3031
extern const URLProtocol ff_ijktcphook_protocol;
3132
extern const URLProtocol ff_ijkio_protocol;
32-
3333
+extern const URLProtocol ff_ijkhttp1_protocol;
3434
+extern const URLProtocol ff_ijkhttp2_protocol;
3535
+extern const URLProtocol ff_ijkhttp3_protocol;
36-
+
36+
3737
#include "libavformat/protocol_list.c"
3838

39-
const AVClass *ff_urlcontext_child_class_iterate(void **iter)
4039
--
4140
2.39.5 (Apple Git-154)
4241

0 commit comments

Comments
 (0)