Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
529
Issue boards
Milestones
Wiki
Code
Merge requests
15
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
53fe49ab
Commit
53fe49ab
authored
4 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Streams: Fix crash when playing audio
Fix
#1249
parent
1b7e4dd7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Pipeline
#15476
failed with stage
in 21 minutes and 6 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/vlc-android/src/org/videolan/vlc/viewmodels/StreamsModel.kt
+4
-6
4 additions, 6 deletions
...c-android/src/org/videolan/vlc/viewmodels/StreamsModel.kt
with
4 additions
and
6 deletions
application/vlc-android/src/org/videolan/vlc/viewmodels/StreamsModel.kt
+
4
−
6
View file @
53fe49ab
...
...
@@ -44,6 +44,10 @@ class StreamsModel(context: Context, coroutineContextProvider: CoroutineContextP
val
observableSearchText
=
ObservableField
<
String
>()
var
service
:
PlaybackService
?
=
null
private
val
serviceCb
=
object
:
PlaybackService
.
Callback
by
EmptyPBSCallback
{
override
fun
update
()
=
refresh
()
}
init
{
if
(
medialibrary
.
isStarted
)
refresh
()
PlaybackService
.
serviceFlow
.
onEach
{
onServiceChanged
(
it
)
}.
launchIn
(
viewModelScope
)
...
...
@@ -81,12 +85,6 @@ class StreamsModel(context: Context, coroutineContextProvider: CoroutineContextP
}
}
private
val
serviceCb
=
object
:
PlaybackService
.
Callback
by
EmptyPBSCallback
{
override
fun
update
()
{
refresh
()
}
}
class
Factory
(
private
val
context
:
Context
)
:
ViewModelProvider
.
Factory
{
override
fun
<
T
:
ViewModel
>
create
(
modelClass
:
Class
<
T
>):
T
{
@Suppress
(
"UNCHECKED_CAST"
)
...
...
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