Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
531
Issue boards
Milestones
Wiki
Code
Merge requests
12
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
b44cb3f7
Commit
b44cb3f7
authored
6 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Prevent VLCObject acccess once released
parent
3e1f7bc6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libvlc/src/org/videolan/libvlc/VideoHelper.java
+3
-3
3 additions, 3 deletions
libvlc/src/org/videolan/libvlc/VideoHelper.java
with
3 additions
and
3 deletions
libvlc/src/org/videolan/libvlc/VideoHelper.java
+
3
−
3
View file @
b44cb3f7
...
...
@@ -77,8 +77,8 @@ class VideoHelper implements IVLCVout.OnNewVideoLayoutListener {
public
void
release
()
{
if
(
mMediaPlayer
.
getVLCVout
().
areViewsAttached
())
detachViews
();
mMediaPlayer
=
null
;
mHandler
.
removeCallbacks
(
null
);
mVideoSurfaceFrame
=
null
;
mHandler
.
removeCallbacks
(
null
);
mVideoSurface
=
null
;
mSubtitlesSurface
=
null
;
mVideoTexture
=
null
;
...
...
@@ -99,7 +99,7 @@ class VideoHelper implements IVLCVout.OnNewVideoLayoutListener {
private
final
Runnable
runnable
=
new
Runnable
()
{
@Override
public
void
run
()
{
if
(
mVideoSurfaceFrame
!=
null
)
updateVideoSurfaces
();
if
(
mVideoSurfaceFrame
!=
null
&&
mOnLayoutChangeListener
!=
null
)
updateVideoSurfaces
();
}
};
@Override
...
...
@@ -117,11 +117,11 @@ class VideoHelper implements IVLCVout.OnNewVideoLayoutListener {
}
public
void
detachViews
()
{
mMediaPlayer
.
setVideoTrackEnabled
(
false
);
if
(
mOnLayoutChangeListener
!=
null
)
{
mVideoSurfaceFrame
.
removeOnLayoutChangeListener
(
mOnLayoutChangeListener
);
mOnLayoutChangeListener
=
null
;
}
mMediaPlayer
.
setVideoTrackEnabled
(
false
);
mMediaPlayer
.
getVLCVout
().
detachViews
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment