Skip to content

Commit ec93cfc

Browse files
committed
bluray + file protocol need decode path
(cherry picked from commit cd49ee96a2215594a2dce726d0ba225da2e159ff)
1 parent c12e1ce commit ec93cfc

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

patches/ffmpeg-n6.1/0021-custom-bluray-fs-for-network-Blu-ray-Disc-and-BDMV.patch

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
From 11fc8207f0a6c1857e009dc6048feb65c0e5fb1d Mon Sep 17 00:00:00 2001
1+
From e6fdbabaf8902e834a745705c851db193b8d553f Mon Sep 17 00:00:00 2001
22
From: qianlongxu <[email protected]>
3-
Date: Sat, 12 Oct 2024 19:05:14 +0800
3+
Date: Tue, 17 Dec 2024 18:59:49 +0800
44
Subject: [PATCH 21] custom bluray fs for network Blu-ray Disc and BDMV
55

66
---
77
libavformat/Makefile | 2 +-
8-
libavformat/bluray.c | 31 ++-
8+
libavformat/bluray.c | 32 ++-
99
libavformat/bluray_custom_fs.c | 413 +++++++++++++++++++++++++++++++++
1010
libavformat/bluray_custom_fs.h | 29 +++
11-
4 files changed, 467 insertions(+), 8 deletions(-)
11+
4 files changed, 468 insertions(+), 8 deletions(-)
1212
create mode 100644 libavformat/bluray_custom_fs.c
1313
create mode 100644 libavformat/bluray_custom_fs.h
1414

@@ -26,7 +26,7 @@ index 427c45a..ffc32b9 100644
2626
OBJS-$(CONFIG_CONCAT_PROTOCOL) += concat.o
2727
OBJS-$(CONFIG_CONCATF_PROTOCOL) += concat.o
2828
diff --git a/libavformat/bluray.c b/libavformat/bluray.c
29-
index bf5b88d..62c7727 100644
29+
index bf5b88d..96a799a 100644
3030
--- a/libavformat/bluray.c
3131
+++ b/libavformat/bluray.c
3232
@@ -21,21 +21,22 @@
@@ -73,19 +73,20 @@ index bf5b88d..62c7727 100644
7373
{
7474
#ifdef DEBUG_BLURAY
7575
bd_set_debug_mask(BLURAY_DEBUG_MASK);
76-
@@ -138,11 +139,27 @@ static int bluray_open(URLContext *h, const char *path, int flags)
76+
@@ -138,11 +139,28 @@ static int bluray_open(URLContext *h, const char *path, int flags)
7777

7878
av_strstart(path, BLURAY_PROTO_PREFIX, &diskname);
7979

8080
- bd->bd = bd_open(diskname, NULL);
8181
+ fs_access *access = NULL;
8282
+
83+
+ diskname = ff_urldecode(diskname, 0);
84+
+
8385
+ if (av_strstart(diskname, "file://", NULL) || av_strstart(diskname, "/", NULL)) {
8486
+ access = NULL;
8587
+ } else {
8688
+ //set read packet buffer size is important! the default packet size is 32768, when use smb2 protocol, download speed is limited to 2MB; but when set the size to 1048576, download speed is 16MB;
8789
+ h->max_packet_size = 1048576;
88-
+ diskname = ff_urldecode(diskname, 0);
8990
+ access = create_bluray_custom_access(diskname, options);
9091
+ }
9192
+
@@ -102,7 +103,7 @@ index bf5b88d..62c7727 100644
102103

103104
/* check if disc can be played */
104105
if (check_disc_info(h) < 0) {
105-
@@ -321,7 +338,7 @@ fail:
106+
@@ -321,7 +339,7 @@ fail:
106107
const URLProtocol ff_bluray_protocol = {
107108
.name = "bluray",
108109
.url_close = bluray_close,
@@ -566,5 +567,5 @@ index 0000000..806fe29
566567
+fs_access * create_bluray_custom_access(const char *url, AVDictionary **options);
567568
+#endif /* bluray_custom_fs_smb2_h */
568569
--
569-
2.39.3 (Apple Git-146)
570+
2.39.5 (Apple Git-154)
570571

0 commit comments

Comments
 (0)