Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
89cdde35
Commit
89cdde35
authored
Nov 12, 2021
by
yanxia54
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
异常信息优化
parent
86500002
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
HlsDownloader.java
...ge/src/main/java/com/yanzuoguang/media/HlsDownloader.java
+3
-10
No files found.
yzg-util-image/src/main/java/com/yanzuoguang/media/HlsDownloader.java
View file @
89cdde35
...
@@ -179,17 +179,11 @@ public class HlsDownloader {
...
@@ -179,17 +179,11 @@ public class HlsDownloader {
}
}
// todo: 输出文件,需要封装成函数
// todo: 输出文件,需要封装成函数
String
fileOutPath
=
rootPath
+
File
.
separator
+
fileName
;
String
fileOutPath
=
rootPath
+
File
.
separator
+
fileName
;
// 订单输出文件流
// 订单输出文件流
try
(
FileOutputStream
fileOutputStream
=
new
FileOutputStream
(
new
File
(
fileOutPath
)))
{
try
(
FileOutputStream
fileOutputStream
=
new
FileOutputStream
(
new
File
(
fileOutPath
)))
{
// 按照顺序遍历文件缓存
// 获取第一个 ts 文件
int
size
=
keyFileMap
.
size
();
File
file
=
new
File
(
keyFileMap
.
get
(
0
));
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
if
(
file
.
exists
())
{
// 获取当前的 ts 文件
File
file
=
new
File
(
keyFileMap
.
get
(
i
));
if
(!
file
.
exists
())
{
continue
;
}
// 读取文件
// 读取文件
FileInputStream
fis
=
new
FileInputStream
(
file
);
FileInputStream
fis
=
new
FileInputStream
(
file
);
// 定义文件缓存
// 定义文件缓存
...
@@ -203,7 +197,6 @@ public class HlsDownloader {
...
@@ -203,7 +197,6 @@ public class HlsDownloader {
}
}
}
}
}
}
return
fileName
;
return
fileName
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment