Skip to content

Commit b515c44

Browse files
committed
fix building error
1 parent fdadecb commit b515c44

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

patches/ffmpeg-n6.1/0020-add-built-in-smb2-protocol-via-libsmb2.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
From dd3692c5f2b6eb587c0853de3b7f9b6f0b30dc6a Mon Sep 17 00:00:00 2001
1+
From eddc99cb17ff667656a38cda644eb239910574a5 Mon Sep 17 00:00:00 2001
22
From: qianlongxu <[email protected]>
3-
Date: Mon, 4 Nov 2024 14:47:57 +0800
3+
Date: Mon, 4 Nov 2024 15:27:00 +0800
44
Subject: [PATCH 20] add built-in smb2 protocol via libsmb2
55

66
---
@@ -62,7 +62,7 @@ index ae952eb..427c45a 100644
6262
OBJS-$(CONFIG_LIBZMQ_PROTOCOL) += libzmq.o
6363
diff --git a/libavformat/libsmb2.c b/libavformat/libsmb2.c
6464
new file mode 100644
65-
index 0000000..741014c
65+
index 0000000..5fa1ba4
6666
--- /dev/null
6767
+++ b/libavformat/libsmb2.c
6868
@@ -0,0 +1,412 @@
@@ -88,7 +88,7 @@ index 0000000..741014c
8888
+
8989
+
9090
+#include <fcntl.h>
91-
+
91+
+#include <errno.h>
9292
+#include "libavutil/avstring.h"
9393
+#include "libavutil/opt.h"
9494
+#include "libavutil/avstring.h"
@@ -311,7 +311,7 @@ index 0000000..741014c
311311
+ if (bytes_read > 0)
312312
+ av_application_did_io_tcp_read(libsmb2->app_ctx, (void*)h, bytes_read);
313313
+
314-
+ return bytes_read ? bytes_read : (has_error ? AVERROR(NOTCONN) : AVERROR_EOF);
314+
+ return bytes_read ? bytes_read : (has_error ? AVERROR(ENOTCONN) : AVERROR_EOF);
315315
+}
316316
+
317317
+static int libsmb2_write(URLContext *h, const unsigned char *buf, int size)
@@ -477,7 +477,7 @@ index 0000000..741014c
477477
+ .priv_data_size = sizeof(LIBSMB2Context),
478478
+ .priv_data_class = &libsmb2lient_context_class,
479479
+ .flags = URL_PROTOCOL_FLAG_NETWORK,
480-
+}
480+
+};
481481
\ No newline at end of file
482482
diff --git a/libavformat/protocols.c b/libavformat/protocols.c
483483
index 73df344..2bda874 100644

0 commit comments

Comments
 (0)