Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
pidan
/
FuSiLive
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
76cce0cc
authored
Apr 07, 2026
by
suolong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复线上奔溃信息。
parent
8ed0da73
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/StreamView/FUSTTVideoPlayer/FUSTTStreamPlayer.m
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/StreamView/FUSTTVideoPlayer/FUSTTStreamPlayer.m
View file @
76cce0cc
...
@@ -35,6 +35,10 @@
...
@@ -35,6 +35,10 @@
// 视频帧是否回调
// 视频帧是否回调
@property
(
nonatomic
,
assign
)
BOOL
openVideoFrameCallBack
;
@property
(
nonatomic
,
assign
)
BOOL
openVideoFrameCallBack
;
@property
(
nonatomic
,
strong
)
FUSTTStreamPlayer
*
retainSelfWhileClosing
;
@property
(
nonatomic
,
strong
)
TVLManager
*
asyncClosingManager
;
@end
@end
@implementation
FUSTTStreamPlayer
@implementation
FUSTTStreamPlayer
...
@@ -155,28 +159,28 @@
...
@@ -155,28 +159,28 @@
}
}
-
(
void
)
fus_destroyPlayer
{
-
(
void
)
fus_destroyPlayer
{
[
self
fus_destroyPlayerAsync
:
YES
];
[
self
fus_destroyPlayerAsync
:
NO
];
}
}
-
(
void
)
fus_destroyPlayerAsync
:
(
BOOL
)
async
{
-
(
void
)
fus_destroyPlayerAsync
:
(
BOOL
)
async
{
if
(
self
.
liveManager
&&
!
self
.
isAsyncClosing
)
{
if
(
self
.
liveManager
&&
!
self
.
isAsyncClosing
)
{
TVLManager
*
manager
=
self
.
liveManager
;
self
.
isAsyncClosing
=
YES
;
self
.
isAsyncClosing
=
YES
;
@try
{
@try
{
if
(
self
.
liveM
anager
.
isPlaying
if
(
m
anager
.
isPlaying
||
self
.
liveM
anager
.
playerLoadState
==
TVLPlayerLoadStateStalled
||
m
anager
.
playerLoadState
==
TVLPlayerLoadStateStalled
||
self
.
liveM
anager
.
playerLoadState
==
TVLPlayerLoadStatePlayable
)
{
||
m
anager
.
playerLoadState
==
TVLPlayerLoadStatePlayable
)
{
[
self
.
liveM
anager
setMuted
:
YES
];
[
m
anager
setMuted
:
YES
];
}
}
[
self
.
liveM
anager
.
playerView
removeFromSuperview
];
[
m
anager
.
playerView
removeFromSuperview
];
if
(
async
)
{
if
(
async
)
{
dispatch_async
(
dispatch_get_global_queue
(
0
,
0
),
^
{
self
.
retainSelfWhileClosing
=
self
;
[
self
.
liveManager
stop
];
self
.
asyncClosingManager
=
manager
;
});
[
manager
closeAsync
];
[
self
.
liveManager
closeAsync
];
}
else
{
}
else
{
[
self
.
liveM
anager
stop
];
[
m
anager
stop
];
[
self
.
liveM
anager
close
];
[
m
anager
close
];
}
}
}
@catch
(
NSException
*
exception
)
{
}
@catch
(
NSException
*
exception
)
{
}
@finally
{
}
@finally
{
...
@@ -186,6 +190,8 @@
...
@@ -186,6 +190,8 @@
_liveManager
.
delegate
=
nil
;
_liveManager
.
delegate
=
nil
;
_liveManager
=
nil
;
_liveManager
=
nil
;
self
.
isAsyncClosing
=
NO
;
self
.
isAsyncClosing
=
NO
;
self
.
asyncClosingManager
=
nil
;
self
.
retainSelfWhileClosing
=
nil
;
}
}
}
}
}
}
...
@@ -465,8 +471,12 @@
...
@@ -465,8 +471,12 @@
[
self
fus_removeKVOIfNeeded
];
[
self
fus_removeKVOIfNeeded
];
self
.
liveManager
=
nil
;
self
.
liveManager
=
nil
;
}
}
if
(
manager
==
self
.
asyncClosingManager
)
{
self
.
asyncClosingManager
=
nil
;
}
manager
=
nil
;
manager
=
nil
;
self
.
isAsyncClosing
=
NO
;
self
.
isAsyncClosing
=
NO
;
self
.
retainSelfWhileClosing
=
nil
;
}
}
#pragma mark - VeLivePlayerObserver
#pragma mark - VeLivePlayerObserver
...
@@ -547,6 +557,7 @@
...
@@ -547,6 +557,7 @@
}
}
-
(
void
)
dealloc
{
-
(
void
)
dealloc
{
_liveManager
.
delegate
=
nil
;
[
self
fus_removeKVOIfNeeded
];
[
self
fus_removeKVOIfNeeded
];
}
}
...
...
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