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
14
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
a917d8d4
Commit
a917d8d4
authored
2 years ago
by
Nicolas Pomepuy
Browse files
Options
Downloads
Patches
Plain Diff
Fix IllegalStateException when the current video track is not available anymore
parent
6d9b81d1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1487
Fix IllegalStateException when the current video track is not available anymore
Pipeline
#258051
passed with stage
in 21 minutes and 43 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/vlc-android/src/org/videolan/vlc/util/FrameRateManager.kt
+11
-4
11 additions, 4 deletions
...vlc-android/src/org/videolan/vlc/util/FrameRateManager.kt
with
11 additions
and
4 deletions
application/vlc-android/src/org/videolan/vlc/util/FrameRateManager.kt
+
11
−
4
View file @
a917d8d4
...
...
@@ -6,12 +6,15 @@ import android.os.Build
import
android.os.Handler
import
android.os.Looper
import
android.util.Log
import
android.view.Surface
import
android.view.SurfaceView
import
android.view.Window
import
android.view.WindowManager
import
androidx.annotation.RequiresApi
import
androidx.appcompat.app.AppCompatActivity
import
androidx.core.content.getSystemService
import
org.videolan.vlc.PlaybackService
import
android.view.*
import
androidx.annotation.RequiresApi
import
org.videolan.vlc.BuildConfig
import
org.videolan.vlc.PlaybackService
import
java.math.BigDecimal
import
java.math.RoundingMode
...
...
@@ -31,7 +34,11 @@ class FrameRateManager(var context: Context, var service: PlaybackService) {
//switching mode may cause playback to pause i.e HDMI
//wait 2 seconds and resume play, mode switch will have happened by then
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
val
videoTrack
=
this
@FrameRateManager
.
service
.
mediaplayer
.
currentVideoTrack
val
videoTrack
=
try
{
this
@FrameRateManager
.
service
.
mediaplayer
.
currentVideoTrack
}
catch
(
e
:
IllegalStateException
)
{
null
}
if
(
videoTrack
!=
null
)
{
service
.
play
()
}
...
...
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