Skip to content

Commit bb34854

Browse files
committed
bluray protocol add dvd fallback
1 parent 1846e83 commit bb34854

14 files changed

+64
-114
lines changed

patches/ffmpeg-n6.1/0018-fix-http-chunked-transfer-get-wrong-size-cause-av_re.patch renamed to patches/ffmpeg-n6.1/0017-fix-http-chunked-transfer-get-wrong-size-cause-av_re.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 2155673117b3d8377311b59a33b1afeae511554b Mon Sep 17 00:00:00 2001
22
From: qianlongxu <qianlongxu@gmail.com>
33
Date: Thu, 27 Jun 2024 18:31:15 +0800
4-
Subject: [PATCH 18] fix http chunked transfer get wrong size cause av_read_frame
4+
Subject: [PATCH 17] fix http chunked transfer get wrong size cause av_read_frame
55
can not return eof bug
66

77
---

patches/ffmpeg-n6.1/0019-supportsFamily-is-only-available-on-iOS-13.0-or-newe.patch renamed to patches/ffmpeg-n6.1/0018-supportsFamily-is-only-available-on-iOS-13.0-or-newe.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 1ebd4c062a886049f3c3255c50fe56f6621b9844 Mon Sep 17 00:00:00 2001
22
From: qianlongxu <qianlongxu@gmail.com>
33
Date: Fri, 26 Jul 2024 16:11:14 +0800
4-
Subject: [PATCH 19] 'supportsFamily:' is only available on iOS 13.0 or newer
4+
Subject: [PATCH 18] 'supportsFamily:' is only available on iOS 13.0 or newer
55

66
---
77
libavfilter/metal/utils.m | 2 +-

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 229f417012635accc6506d0c179343654b984f38 Mon Sep 17 00:00:00 2001
22
From: qianlongxu <qianlongxu@gmail.com>
33
Date: Thu, 27 Feb 2025 14:49:42 +0800
4-
Subject: [PATCH 20] add built-in smb2 protocol via libsmb2
4+
Subject: [PATCH 19] add built-in smb2 protocol via libsmb2
55

66
---
77
configure | 5 +

patches/ffmpeg-n6.1/0023-fix-http-open-and-http_seek-redirect-authentication-.patch renamed to patches/ffmpeg-n6.1/0020-fix-http-open-and-http_seek-redirect-authentication-.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 29b3f4f302406cc546d87e5e8d26a20417bfcb63 Mon Sep 17 00:00:00 2001
22
From: qianlongxu <qianlongxu@gmail.com>
33
Date: Tue, 12 Nov 2024 16:00:23 +0800
4-
Subject: [PATCH 23] fix http open and http_seek (redirect) authentication bug
4+
Subject: [PATCH 20] fix http open and http_seek (redirect) authentication bug
55

66
---
77
libavformat/http.c | 25 ++++++++++++++++++++++++-

patches/ffmpeg-n6.1/0024-Adapt-to-clang-16.patch renamed to patches/ffmpeg-n6.1/0021-Adapt-to-clang-16.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 338d6fb305a992bc2a24347e4d7793e02b54345d Mon Sep 17 00:00:00 2001
22
From: qianlongxu <qianlongxu@gmail.com>
33
Date: Thu, 31 Oct 2024 10:55:33 +0800
4-
Subject: [PATCH 24] Adapt to clang 16
4+
Subject: [PATCH 21] Adapt to clang 16
55

66
---
77
configure | 8 +++++++-

patches/ffmpeg-n6.1/0025-fix-can-t-seek-to-00-00-bug-baidu-neddisk-hls-start_.patch renamed to patches/ffmpeg-n6.1/0022-fix-can-t-seek-to-00-00-bug-baidu-neddisk-hls-start_.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 411a7fc1b4be73f655ca2881cc8e16a862bfe194 Mon Sep 17 00:00:00 2001
22
From: qianlongxu <qianlongxu@gmail.com>
33
Date: Fri, 1 Nov 2024 16:56:53 +0800
4-
Subject: [PATCH 25] fix can't seek to 00:00 bug, baidu neddisk hls start_time is
4+
Subject: [PATCH 22] fix can't seek to 00:00 bug, baidu neddisk hls start_time is
55
less than first_timestamp
66

77
---

patches/ffmpeg-n6.1/0022-support-probe-bluray-video.patch

Lines changed: 0 additions & 104 deletions
This file was deleted.

patches/ffmpeg-n6.1/0026-http-add-reconnect_first_delay-opt.patch renamed to patches/ffmpeg-n6.1/0023-http-add-reconnect_first_delay-opt.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 18f90d0efc60ba8bee97bbe1c7c1a6f139b9ff24 Mon Sep 17 00:00:00 2001
22
From: qianlongxu <qianlongxu@gmail.com>
33
Date: Tue, 12 Nov 2024 14:42:37 +0800
4-
Subject: [PATCH 26] http add reconnect_first_delay opt
4+
Subject: [PATCH 23] http add reconnect_first_delay opt
55

66
---
77
libavformat/http.c | 4 +++-

patches/ffmpeg-n6.1/0027-Audio-Vivid-Parser-and-Demuxer-but-av3a-Decoder-is-a.patch renamed to patches/ffmpeg-n6.1/0024-Audio-Vivid-Parser-and-Demuxer-but-av3a-Decoder-is-a.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From f73942871770f5e268178c886b7d6100e1c5faba Mon Sep 17 00:00:00 2001
22
From: qianlongxu <qianlongxu@gmail.com>
33
Date: Mon, 18 Nov 2024 17:12:20 +0800
4-
Subject: [PATCH 27] Audio Vivid Parser and Demuxer, but av3a Decoder is absent
4+
Subject: [PATCH 24] Audio Vivid Parser and Demuxer, but av3a Decoder is absent
55

66
---
77
libavcodec/Makefile | 1 +

patches/ffmpeg-n6.1/0028-add-4-dummy-ijkplaceholder-demuxers.patch renamed to patches/ffmpeg-n6.1/0025-add-4-dummy-ijkplaceholder-demuxers.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 6d78475920216bbc66a63d6aa7484b7ad57f7ff8 Mon Sep 17 00:00:00 2001
22
From: qianlongxu <qianlongxu@gmail.com>
33
Date: Thu, 28 Nov 2024 11:28:43 +0800
4-
Subject: [PATCH 28] add 4 dummy ijkplaceholder demuxers
4+
Subject: [PATCH 25] add 4 dummy ijkplaceholder demuxers
55

66
---
77
libavformat/allformats.c | 5 +++++

patches/ffmpeg-n6.1/0029-add-3-dummy-ijkhttp-protocols-and-use-selected_http-.patch renamed to patches/ffmpeg-n6.1/0026-add-3-dummy-ijkhttp-protocols-and-use-selected_http-.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From ab8fe6d0c2de932980f6f1e9d31e24f25750da37 Mon Sep 17 00:00:00 2001
22
From: qianlongxu <qianlongxu@gmail.com>
33
Date: Fri, 14 Mar 2025 17:41:28 +0800
4-
Subject: [PATCH 29] add 3 dummy ijkhttp protocols and use selected_http option
4+
Subject: [PATCH 26] add 3 dummy ijkhttp protocols and use selected_http option
55
choose
66

77
---
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
From b5176510c15322f2223c5e16af20e65be98db163 Mon Sep 17 00:00:00 2001
2+
From: qianlongxu <qianlongxu@gmail.com>
3+
Date: Wed, 19 Mar 2025 13:22:27 +0800
4+
Subject: [PATCH 28] bluray protocol add dvd fallback
5+
6+
---
7+
libavformat/demux.c | 24 +++++++++++++++++++++---
8+
1 file changed, 21 insertions(+), 3 deletions(-)
9+
10+
diff --git a/libavformat/demux.c b/libavformat/demux.c
11+
index 51fff7b..05e02db 100644
12+
--- a/libavformat/demux.c
13+
+++ b/libavformat/demux.c
14+
@@ -158,7 +158,10 @@ static int init_input(AVFormatContext *s, const char *filename,
15+
int ret;
16+
AVProbeData pd = { filename, NULL, 0 };
17+
int score = AVPROBE_SCORE_RETRY;
18+
-
19+
+ AVDictionary *tmp_opts = NULL;
20+
+ if (options && (av_stristart(filename, "bluray://", NULL) || av_stristart(filename, "dvd://", NULL))) {
21+
+ av_dict_copy(&tmp_opts, *options, 0);
22+
+ }
23+
if (s->pb) {
24+
s->flags |= AVFMT_FLAG_CUSTOM_IO;
25+
if (!s->iformat)
26+
@@ -174,8 +177,23 @@ static int init_input(AVFormatContext *s, const char *filename,
27+
(!s->iformat && (s->iformat = av_probe_input_format2(&pd, 0, &score))))
28+
return score;
29+
30+
- if ((ret = s->io_open(s, &s->pb, filename, AVIO_FLAG_READ | s->avio_flags, options)) < 0)
31+
- return ret;
32+
+ if ((ret = s->io_open(s, &s->pb, filename, AVIO_FLAG_READ | s->avio_flags,
33+
+ options)) < 0) {
34+
+ if (av_stristart(filename, "bluray://", NULL)) {
35+
+ const char *dvd_name =
36+
+ av_strireplace(filename, "bluray://", "dvd://");
37+
+ ret = init_input(s, dvd_name, &tmp_opts);
38+
+ av_dict_free(&tmp_opts);
39+
+ return ret;
40+
+ } else if (av_stristart(filename, "dvd://", NULL)) {
41+
+ const char *a_name = av_strireplace(filename, "dvd://", "");
42+
+ ret = init_input(s, a_name, &tmp_opts);
43+
+ av_dict_free(&tmp_opts);
44+
+ return ret;
45+
+ } else {
46+
+ return ret;
47+
+ }
48+
+ }
49+
50+
if (s->iformat)
51+
return 0;
52+
--
53+
2.39.5 (Apple Git-154)
54+

0 commit comments

Comments
 (0)